X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdiagnostics.pm;h=7af5efa1778bb2974aa9aa2f00aa60c0cdc21b67;hb=d81018543234fe5f8d429eb7048c0b50792ea031;hp=11f0aadc3005180cd3a44d1a93b346ab9b1e64e8;hpb=b4e8c6dd0853d6a1de629186530fac6405389283;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index 11f0aad..7af5efa 100755 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -181,11 +181,11 @@ Tom Christiansen >, 25 June 1995. =cut use strict; -use 5.006; +use 5.009001; use Carp; $Carp::Internal{__PACKAGE__.""}++; -our $VERSION = 1.16; +our $VERSION = 1.17; our $DEBUG; our $VERBOSE; our $PRETTY; @@ -221,7 +221,7 @@ $DEBUG ||= 0; my $WHOAMI = ref bless []; # nobody's business, prolly not even mine local $| = 1; -local $_; +my $_; my $standalone; my(%HTML_2_Troff, %HTML_2_Latin_1, %HTML_2_ASCII_7); @@ -323,7 +323,6 @@ my %msg; { print STDERR "FINISHING COMPILATION for $_\n" if $DEBUG; local $/ = ''; - local $_; my $header; my $for_item; while () { @@ -395,7 +394,7 @@ my %msg; $toks[$i] = '[\da-f]+'; } } elsif( length( $toks[$i] ) ){ - $toks[$i] =~ s/^.*$/\Q$&\E/; + $toks[$i] = quotemeta $toks[$i]; $conlen += length( $toks[$i] ); } } @@ -548,8 +547,9 @@ my $count; my $wantspace; sub splainthis { return 0 if $TRACEONLY; - local $_ = shift; + $_ = shift; local $\; + local $!; ### &finish_compilation unless %msg; s/\.?\n+$//; my $orig = $_; @@ -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+/ ){