Tiny SelfLoader patch for better warnings
[p5sagit/p5-mst-13.2.git] / lib / diagnostics.pm
index 482fe28..7af5efa 100755 (executable)
@@ -394,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] );
                 }
             }  
@@ -549,6 +549,7 @@ sub splainthis {
     return 0 if $TRACEONLY;
     $_ = shift;
     local $\;
+    local $!;
     ### &finish_compilation unless %msg;
     s/\.?\n+$//;
     my $orig = $_;