From: Daniel S. Lewart Date: Thu, 24 May 2001 05:05:22 +0000 (-0500) Subject: lib/dumpvar.pl, lib/perl5db.pl - fix warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=600d99fa249bb9ea83f068d4a70954217a9361a3;p=p5sagit%2Fp5-mst-13.2.git lib/dumpvar.pl, lib/perl5db.pl - fix warnings Message-ID: <20010524050522.A18997@staff1.cso.uiuc.edu> p4raw-id: //depot/perl@10191 --- diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl index 51e9c88..c918f2b 100644 --- a/lib/dumpvar.pl +++ b/lib/dumpvar.pl @@ -187,7 +187,7 @@ sub unwrap { $tArrayDepth = $#{$v} ; undef $more ; $tArrayDepth = $#{$v} < $arrayDepth-1 ? $#{$v} : $arrayDepth-1 - unless $arrayDepth eq '' ; + if defined $arrayDepth && $arrayDepth ne ''; $more = "....\n" if $tArrayDepth < $#{$v} ; $shortmore = ""; $shortmore = " ..." if $tArrayDepth < $#{$v} ; diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 98fb50d..1e1b163 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2,7 +2,7 @@ package DB; # Debugger for Perl 5.00x; perl5db.pl patch level: -$VERSION = 1.10; +$VERSION = 1.12; $header = "perl5db.pl version $VERSION"; # @@ -245,6 +245,13 @@ $header = "perl5db.pl version $VERSION"; # + Fixed warnings generated by "perl -dWe 42" # + Corrected spelling errors # + Squeezed Help (h) output into 80 columns +# +# Changes: 1.11: May 24, 2001 David Dyck +# + Made "x @INC" work like it used to +# +# Changes: 1.12: May 24, 2001 Daniel Lewart +# + Fixed warnings generated by "O" (Show debugger options) +# + Fixed warnings generated by "p 42" (Print expression) #################################################################### @@ -1724,10 +1731,9 @@ sub eval { eval { &DB::save }; if ($at) { print $OUT $at; - } elsif ($onetimeDump eq 'dump') { - dumpit($OUT, \@res); - } elsif ($onetimeDump eq 'methods') { - methods($res[0]); + } elsif ($onetimeDump) { + dumpit($OUT, \@res) if $onetimeDump eq 'dump'; + methods($res[0]) if $onetimeDump eq 'methods'; } @res; } @@ -2128,6 +2134,7 @@ sub option_val { } else { $val = $option{$opt}; } + $val = $default unless defined $val; $val }