summaryrefslogtreecommitdiff
path: root/lib/dumpvar.pl
diff options
context:
space:
mode:
authorPeter Scott <Peter@PSDT.com>2002-03-15 10:19:21 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-16 17:54:49 +0000
commit3a4b996c622ca8a2cd8d468317fb869865ee25b2 (patch)
tree59e31c3a8851b5245c84995dabc5c6178d5d0029 /lib/dumpvar.pl
parenta48ec845cbd27881b821dcb9bb80e52ba093c5f2 (diff)
downloadperl-3a4b996c622ca8a2cd8d468317fb869865ee25b2.tar.gz
Re: dumpvar.pl bug
Message-id: <4.3.2.7.2.20020315153302.00bac420@shell2.webquarry.com> p4raw-id: //depot/perl@15258
Diffstat (limited to 'lib/dumpvar.pl')
-rw-r--r--lib/dumpvar.pl16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl
index 184faa39f3..2fb1f695ce 100644
--- a/lib/dumpvar.pl
+++ b/lib/dumpvar.pl
@@ -237,13 +237,13 @@ sub unwrap {
print "$sp-> ",&stringify($$v,1),"\n";
if ($globPrint) {
$s += 3;
- dumpglob($s, "{$$v}", $$v, 1);
+ dumpglob($s, "{$$v}", $$v, 1, $m-1);
} elsif (defined ($fileno = fileno($v))) {
print( (' ' x ($s+3)) . "FileHandle({$$v}) => fileno($fileno)\n" );
}
} elsif (ref \$v eq 'GLOB') {
if ($globPrint) {
- dumpglob($s, "{$v}", $v, 1) if $globPrint;
+ dumpglob($s, "{$v}", $v, 1, $m-1) if $globPrint;
} elsif (defined ($fileno = fileno(\$v))) {
print( (' ' x $s) . "FileHandle({$v}) => fileno($fileno)\n" );
}
@@ -296,16 +296,16 @@ sub quote {
sub dumpglob {
return if $DB::signal;
- my ($off,$key, $val, $all) = @_;
+ my ($off,$key, $val, $all, $m) = @_;
local(*entry) = $val;
my $fileno;
if (($key !~ /^_</ or $dumpDBFiles) and defined $entry) {
print( (' ' x $off) . "\$", &unctrl($key), " = " );
- DumpElem $entry, 3+$off;
+ DumpElem $entry, 3+$off, $m;
}
if (($key !~ /^_</ or $dumpDBFiles) and @entry) {
print( (' ' x $off) . "\@$key = (\n" );
- unwrap(\@entry,3+$off) ;
+ unwrap(\@entry,3+$off,$m) ;
print( (' ' x $off) . ")\n" );
}
if ($key ne "main::" && $key ne "DB::" && %entry
@@ -313,7 +313,7 @@ sub dumpglob {
&& ($key !~ /^_</ or $dumpDBFiles)
&& !($package eq "dumpvar" and $key eq "stab")) {
print( (' ' x $off) . "\%$key = (\n" );
- unwrap(\%entry,3+$off) ;
+ unwrap(\%entry,3+$off,$m) ;
print( (' ' x $off) . ")\n" );
}
if (defined ($fileno = fileno(*entry))) {
@@ -361,7 +361,7 @@ sub findsubs {
}
sub main::dumpvar {
- my ($package,@vars) = @_;
+ my ($package,$m,@vars) = @_;
local(%address,$key,$val,$^W);
$package .= "::" unless $package =~ /::$/;
*stab = *{"main::"};
@@ -379,7 +379,7 @@ sub main::dumpvar {
if ($package ne 'dumpvar' or $key ne 'stab')
and ref(\$val) eq 'GLOB';
} else {
- dumpglob(0,$key, $val);
+ dumpglob(0,$key, $val, 0, $m);
}
}
if ($usageOnly) {