} elsif ($h{targ}) {
my $padname = (($curcv->PADLIST->ARRAY)[0]->ARRAY)[$h{targ}];
if (defined $padname and class($padname) ne "SPECIAL") {
- $h{targarg} = $padname->PV;
+ $h{targarg} = $padname->PVX;
my $intro = $padname->NVX - $cop_seq_base;
my $finish = int($padname->IVX) - $cop_seq_base;
$finish = "end" if $finish == 999999999 - $cop_seq_base;
# to see the names of file scope lexicals used by bar.pl
#
-sub showarray {
+sub shownamearray {
+ my ($name, $av) = @_;
+ my @els = $av->ARRAY;
+ my $count = @els;
+ my $i;
+ print "$name has $count entries\n";
+ for ($i = 0; $i < $count; $i++) {
+ print "$i: ";
+ my $sv = $els[$i];
+ if (class($sv) ne "SPECIAL") {
+ printf "%s (0x%lx) %s\n", class($sv), $$sv, $sv->PVX;
+ } else {
+ $sv->terse;
+ }
+ }
+}
+
+sub showvaluearray {
my ($name, $av) = @_;
my @els = $av->ARRAY;
my $count = @els;
sub showlex {
my ($objname, $namesav, $valsav) = @_;
- showarray("Pad of lexical names for $objname", $namesav);
- showarray("Pad of lexical values for $objname", $valsav);
+ shownamearray("Pad of lexical names for $objname", $namesav);
+ showvaluearray("Pad of lexical values for $objname", $valsav);
}
sub showlex_obj {