In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fa542f558f44c8c868faa064d630855ce315e339?hp=56610b8f2b65d1b4ac923119d519ef5afae19e61>

- Log -----------------------------------------------------------------
commit fa542f558f44c8c868faa064d630855ce315e339
Author: Father Chrysostomos <[email protected]>
Date:   Mon Sep 1 22:51:10 2014 -0700

    Add test for \p{} failing silently
    
    This tests the fix added in commit 2db3e09128.
    
    Only after writing what I said in
    <[email protected]> did I realise
    that this is actually trivial to test.

M       t/re/pat.t

commit 3bf4a1dc4169e64441367a90ffb4ef88f763c17d
Author: Father Chrysostomos <[email protected]>
Date:   Mon Sep 1 22:36:17 2014 -0700

    Fix thinko in toke.c in 211a434
    
    Oops.  We can’t fiddle with the rv2cv op’s GV kid if it actually a
    padcv op.  Don’t even look at it when handling a lexical sub call,
    because we don’t need it anyway.
    
    This should hopefully mitigate valgrind complaints.

M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 t/re/pat.t | 21 ++++++++++++++++++++-
 toke.c     |  2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/t/re/pat.t b/t/re/pat.t
index 770a45a..ba64d29 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -20,7 +20,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 738;  # Update this when adding/deleting tests.
+plan tests => 739;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1612,6 +1612,25 @@ EOP
         like("X", qr/$x/, "UTF-8 of /[x]/i matches upper case");
     }
 
+    {   # make sure we get an error when \p{} cannot load Unicode tables
+        fresh_perl_like(<<'        prog that cannot load uni tables',
+            BEGIN {
+                @INC = '../lib';
+                require utf8; require 'utf8_heavy.pl';
+                @INC = ();
+            }
+            $name = 'A B';
+            if ($name =~ /(\p{IsUpper}) (\p{IsUpper})/){
+                print "It's good! >$1< >$2<\n";
+            } else {
+                print "It's not good...\n";
+            }
+        prog that cannot load uni tables
+                  qr/^Can't locate unicore\/Heavy\.pl(?x:
+                   )|^Can't find Unicode property definition/,
+                  undef,
+                 '\p{} should not fail silently when uni tables evanesce');
+    }
 } # End of sub run_tests
 
 1;
diff --git a/toke.c b/toke.c
index 98e4b7d..e5e3ddf 100644
--- a/toke.c
+++ b/toke.c
@@ -6704,7 +6704,7 @@ Perl_yylex(pTHX)
                    }
 
                    /* Resolve to GV now if this is a placeholder. */
-                   if ((gvop = cUNOPx(rv2cv_op)->op_first)
+                   if (!off && (gvop = cUNOPx(rv2cv_op)->op_first)
                     && gvop->op_type == OP_GV) {
                        GV *gv2 = cGVOPx_gv(gvop);
                        if (gv2 && !isGV(gv2)) {

--
Perl5 Master Repository

Reply via email to