From: Robin Houston Date: Mon, 2 Apr 2001 20:24:03 +0000 (+0100) Subject: @stash_array = split(/pat/, str); X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2a3cfdd2ae28c5788743d392c2d839a919b1e53;p=p5sagit%2Fp5-mst-13.2.git @stash_array = split(/pat/, str); Message-ID: <20010402202402.A8005@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@9521 --- diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index cc894d3..900a70a 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -189,7 +189,8 @@ sub walk_topdown { walk_topdown($kid, $sub, $level + 1); } } - if (class($op) eq "PMOP" and $ {$op->pmreplroot}) { + if (class($op) eq "PMOP" and $ {$op->pmreplroot} + and $op->pmreplroot->isa("B::OP")) { walk_topdown($op->pmreplroot, $sub, $level + 1); } } @@ -339,8 +340,13 @@ sub concise_op { if ($h{class} eq "PMOP") { my $precomp = $op->precomp; $precomp = defined($precomp) ? "/$precomp/" : ""; - my $pmreplstart; - if ($ {$op->pmreplstart}) { + my $pmreplroot = $op->pmreplroot; + my ($pmreplroot, $pmreplstart); + if ($ {$pmreplroot = $op->pmreplroot} && $pmreplroot->isa("B::GV")) { + # with C<@stash_array = split(/pat/, str);>, + # *stash_array is stored in pmreplroot. + $h{arg} = "($precomp => \@" . $pmreplroot->NAME . ")"; + } elsif ($ {$op->pmreplstart}) { undef $lastnext; $pmreplstart = "replstart->" . seq($op->pmreplstart); $h{arg} = "(" . join(" ", $precomp, $pmreplstart) . ")";