Change 29972 by [EMAIL PROTECTED] on 2007/01/25 12:23:45
Subject: Re: [perl #41283] B::walkoptree_slow fails for 'our @foo =
split( m/ /, "hello" )'
From: "Joshua ben Jore" <[EMAIL PROTECTED]>
Date: Wed, 17 Jan 2007 17:49:22 -0800
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/ext/B/B.pm#77 edit
Differences ...
==== //depot/perl/ext/B/B.pm#77 (text) ====
Index: perl/ext/B/B.pm
--- perl/ext/B/B.pm#76~29629~ 2006-12-28 12:02:03.000000000 -0800
+++ perl/ext/B/B.pm 2007-01-25 04:23:45.000000000 -0800
@@ -7,7 +7,7 @@
#
package B;
-our $VERSION = '1.14';
+our $VERSION = '1.15';
use XSLoader ();
require Exporter;
@@ -119,7 +119,7 @@
$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 @@
}
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;
End of Patch.