In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/06fc68671f70339bdc6ddf5b7367ae9db8b4cd2a?hp=bb1773de14d1367a85531986b90d3ce2d9da9dcb>

- Log -----------------------------------------------------------------
commit 06fc68671f70339bdc6ddf5b7367ae9db8b4cd2a
Author: Vincent Pit <[email protected]>
Date:   Wed Jan 6 19:13:27 2010 +0100

    [perl #71870] Use of uninitialized value in bitwise and B::Deparse
    
    It's better to just silence it in Deparse rather than stopping
    B::PMOP::reflags from returning undef because of a non-constant regexp.
    That way, we keep the possibility to test for this situation, and it stays
    in line with B::PMOP::pregcomp.
    
    Also bump $B::Deparse::VERSION.
-----------------------------------------------------------------------

Summary of changes:
 dist/B-Deparse/Deparse.pm  |    5 +++--
 dist/B-Deparse/t/deparse.t |    8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm
index 93e250f..7c82c3a 100644
--- a/dist/B-Deparse/Deparse.pm
+++ b/dist/B-Deparse/Deparse.pm
@@ -23,7 +23,7 @@ use B qw(class main_root main_start main_cv svref_2object 
opnumber perlstring
         PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED),
         ($] < 5.009 ? 'PMf_SKIPWHITE' : 'RXf_SKIPWHITE'),
         ($] < 5.011 ? 'CVf_LOCKED' : ());
-$VERSION = 0.93;
+$VERSION = 0.94;
 use strict;
 use vars qw/$AUTOLOAD/;
 use warnings ();
@@ -4311,10 +4311,11 @@ sub pp_split {
     }
 
     # handle special case of split(), and split(' ') that compiles to /\s+/
+    # Under 5.10, the reflags may be undef if the split regexp isn't a constant
     $kid = $op->first;
     if ( $kid->flags & OPf_SPECIAL
         and ( $] < 5.009 ? $kid->pmflags & PMf_SKIPWHITE()
-             : $kid->reflags & RXf_SKIPWHITE() ) ) {
+             : ($kid->reflags || 0) & RXf_SKIPWHITE() ) ) {
        $exprs[0] = "' '";
     }
 
diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t
index 191324a..0404ab3 100644
--- a/dist/B-Deparse/t/deparse.t
+++ b/dist/B-Deparse/t/deparse.t
@@ -17,7 +17,7 @@ BEGIN {
     require feature;
     feature->import(':5.10');
 }
-use Test::More tests => 83;
+use Test::More tests => 84;
 use Config ();
 
 use B::Deparse;
@@ -615,3 +615,9 @@ my @b;
 @a = reverse @a;
 @b = reverse @b;
 ();
+####
+my($r, $s, @a);
+...@a = split(/foo/, $s, 0);
+$r = qr/foo/;
+...@a = split(/$r/, $s, 0);
+();

--
Perl5 Master Repository

Reply via email to