This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Module-Build-0.2803
[perl5.git] / lib / diagnostics.pm
index a191035..e81581b 100755 (executable)
@@ -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+/ ){