use 5.005_64; # for (defined ref) and $#$v and our
package Dumpvalue;
use strict;
+our $VERSION = '1.00';
our(%address, $stab, @stab, %stab, %subs);
# translate control chars to ^X - Randal Schwartz
if ($self->{compactDump} && !grep(ref $_, @{$v})) {
if ($#$v >= 0) {
$short = $sp . "0..$#{$v} " .
- join(" ",
- map {$self->stringify($_)} @{$v}[0..$tArrayDepth])
- . "$shortmore";
+ join(" ",
+ map {exists $v->[$_] ? $self->stringify($v->[$_]) : "empty"} ($[..$tArrayDepth)
+ ) . "$shortmore";
} else {
$short = $sp . "empty array";
}
for my $num ($[ .. $tArrayDepth) {
return if $DB::signal and $self->{stopDbSignal};
print "$sp$num ";
- $self->DumpElem($v->[$num], $s);
+ if (exists $v->[$num]) {
+ $self->DumpElem($v->[$num], $s);
+ } else {
+ print "empty slot\n";
+ }
}
print "$sp empty array\n" unless @$v;
print "$sp$more" if defined $more ;
Recognized options:
-=over
+=over 4
=item C<arrayDepth>, C<hashDepth>
=head2 Methods
-=over
+=over 4
=item dumpValue