diff options
author | Joshua ben Jore <jjore@cpan.org> | 2007-01-17 09:49:22 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-25 12:23:45 +0000 |
commit | 156f89f0e7d18e47942e0dd315561acafbba17b5 (patch) | |
tree | 878939e1cabc7d5fbb4e6f6d2c033a8df0880b6f /ext | |
parent | b5c2dcb896d432b12ffe33fec8f2d720824f50e6 (diff) | |
download | perl-156f89f0e7d18e47942e0dd315561acafbba17b5.tar.gz |
Re: [perl #41283] B::walkoptree_slow fails for 'our @foo = split( m/ /, "hello" )'
From: "Joshua ben Jore" <twists@gmail.com>
Message-ID: <dc5c751d0701171749x3f2dfd00tc523d33bc234c530@mail.gmail.com>
p4raw-id: //depot/perl@29972
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm index 332018fa98..2e5409ca58 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -7,7 +7,7 @@ # package B; -our $VERSION = '1.14'; +our $VERSION = '1.15'; use XSLoader (); require Exporter; @@ -119,7 +119,7 @@ sub walkoptree_slow { $op_count++; # just for statistics $level ||= 0; warn(sprintf("walkoptree: %d. %s\n", $level, peekop($op))) if $debug; - $op->$method($level); + $op->$method($level) if $op->can($method); if ($$op && ($op->flags & OPf_KIDS)) { my $kid; unshift(@parents, $op); @@ -128,7 +128,11 @@ sub walkoptree_slow { } shift @parents; } - if (class($op) eq 'PMOP' && ref($op->pmreplroot) && ${$op->pmreplroot}) { + if (class($op) eq 'PMOP' + && ref($op->pmreplroot) + && ${$op->pmreplroot} + && $op->pmreplroot->isa( 'B::OP' )) + { unshift(@parents, $op); walkoptree_slow($op->pmreplroot, $method, $level + 1); shift @parents; |