[perl #39141] lots of warnings with diagnostics and (warn or die)
authorDave Mitchell <davem@fdisolutions.com>
Fri, 19 May 2006 00:14:15 +0000 (00:14 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Fri, 19 May 2006 00:14:15 +0000 (00:14 +0000)
stop C<use diagnostics; warn "\n">  outputing lots of 'uninit'
warnings.

p4raw-id: //depot/perl@28231

lib/diagnostics.pm

index 11f0aad..e81581b 100755 (executable)
@@ -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+/ ){