=cut
use strict;
-use B qw(peekop class comppadlist main_start svref_2object walksymtable);
-
-# Constants (should probably be elsewhere)
-sub OPpLVAL_INTRO () { 128 }
-sub SVf_POK () { 0x40000 }
+use B qw(peekop class comppadlist main_start svref_2object walksymtable
+ OPpLVAL_INTRO SVf_POK
+ );
sub UNKNOWN { ["?", "?", "?"] }
for ($ix = 1; $ix < @namelist; $ix++) {
my $namesv = $namelist[$ix];
next if class($namesv) eq "SPECIAL";
- my ($type, $name) = $namesv->PV =~ /^(.)(.*)$/;
+ my ($type, $name) = $namesv->PV =~ /^(.)([^\0]*)(\0.*)?$/;
$pad[$ix] = ["(lexical)", $type, $name];
}
}
warn sprintf("top = [%s, %s, %s]\n", @$top) if $debug_top;
warn peekop($op), "\n" if $debug_op;
my $ppname = $op->ppaddr;
- if ($ppname =~ /^pp_(or|and|mapwhile|grepwhile)$/) {
+ if ($ppname =~ /^pp_(or|and|mapwhile|grepwhile|range|cond_expr)$/) {
xref($op->other);
} elsif ($ppname eq "pp_match" || $ppname eq "pp_subst") {
xref($op->pmreplstart);
xref($op->other->pmreplstart);
$op = $op->other;
redo;
- } elsif ($ppname eq "pp_cond_expr") {
- # pp_cond_expr never returns op_next
- xref($op->true);
- $op = $op->false;
- redo;
} elsif ($ppname eq "pp_enterloop") {
xref($op->redoop);
xref($op->nextop);