X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdiagnostics.pm;h=e81581b00733a0762d266d7142907286b482b076;hb=c7e68384b26a4c916827142ae090582b63face0c;hp=a1910359b41dba14ade3080e59b88bbeaccd2a00;hpb=c411974dd51c7d7c0ee08434cc1bb9b77909385d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index a191035..e81581b 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -60,7 +60,7 @@ allowing duplicate user messages to be displayed. This module also adds a stack trace to the error message when perl dies. This is useful for pinpointing what caused the death. The B<-traceonly> (or -just B<-t>) flag turns off the explantions of warning messages leaving just +just B<-t>) flag turns off the explanations of warning messages leaving just the stack traces. So if your script is dieing, run it again with perl -Mdiagnostics=-traceonly my_bad_script @@ -185,7 +185,7 @@ use 5.006; use Carp; $Carp::Internal{__PACKAGE__.""}++; -our $VERSION = 1.14; +our $VERSION = 1.16; our $DEBUG; our $VERBOSE; our $PRETTY; @@ -466,12 +466,12 @@ sub import { $PRETTY++; next; }; - - /^-t(race)?$/ && do { + # matches trace and traceonly for legacy doc mixup reasons + /^-t(race(only)?)?$/ && do { $TRACEONLY++; next; }; - /^-w(arntrace)?$/ && do { + /^-w(arntrace)?$/ && do { $WARNTRACE++; next; }; @@ -562,6 +562,7 @@ sub splainthis { # but be aware of messsages containing " at this-or-that" my $real = 0; my @secs = split( / at / ); + return unless @secs; $_ = $secs[0]; for my $i ( 1..$#secs ){ if( $secs[$i] =~ /.+? (?:line|chunk) \d+/ ){