From 4c82ae22ce2b9a6d9891a286b3b4d41b58d56d4e Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 19 Mar 2000 06:30:11 +0000 Subject: default warnLevel and dieLevel to 0 in debugger (from Tom Christiansen); make dumpvar.pl safe against non-glob entries in stashes p4raw-id: //depot/perl@5818 --- lib/Dumpvalue.pm | 3 ++- lib/dumpvar.pl | 4 +++- lib/perl5db.pl | 14 +++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/Dumpvalue.pm b/lib/Dumpvalue.pm index 94b6aa6e78..5d3a9dafc2 100644 --- a/lib/Dumpvalue.pm +++ b/lib/Dumpvalue.pm @@ -404,7 +404,8 @@ sub dumpvars { next if @vars && !grep( matchvar($key, $_), @vars ); if ($self->{usageOnly}) { $self->globUsage(\$val, $key) - unless $package eq 'Dumpvalue' and $key eq 'stab'; + if ($package ne 'Dumpvalue' or $key ne 'stab') + and ref(\$val) eq 'GLOB'; } else { $self->dumpglob($package, 0,$key, $val); } diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl index c72781801b..4a3041a02b 100644 --- a/lib/dumpvar.pl +++ b/lib/dumpvar.pl @@ -361,7 +361,9 @@ sub main::dumpvar { return if $DB::signal; next if @vars && !grep( matchvar($key, $_), @vars ); if ($usageOnly) { - globUsage(\$val, $key) unless $package eq 'dumpvar' and $key eq 'stab'; + globUsage(\$val, $key) + if ($package ne 'dumpvar' or $key ne 'stab') + and ref(\$val) eq 'GLOB'; } else { dumpglob(0,$key, $val); } diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 23fcb1cae4..132e08e0bd 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -273,13 +273,13 @@ $inhibit_exit = $option{PrintRet} = 1; ); # These guys may be defined in $ENV{PERL5DB} : -$rl = 1 unless defined $rl; -$warnLevel = 1 unless defined $warnLevel; -$dieLevel = 1 unless defined $dieLevel; -$signalLevel = 1 unless defined $signalLevel; -$pre = [] unless defined $pre; -$post = [] unless defined $post; -$pretype = [] unless defined $pretype; +$rl = 1 unless defined $rl; +$warnLevel = 0 unless defined $warnLevel; +$dieLevel = 0 unless defined $dieLevel; +$signalLevel = 1 unless defined $signalLevel; +$pre = [] unless defined $pre; +$post = [] unless defined $post; +$pretype = [] unless defined $pretype; warnLevel($warnLevel); dieLevel($dieLevel); -- cgit v1.2.1