This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Patch by Abigail to avoid using $& in diagnostics.pm.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 15 Mar 2007 17:43:43 +0000 (17:43 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 15 Mar 2007 17:43:43 +0000 (17:43 +0000)
p4raw-id: //depot/perl@30601

lib/diagnostics.pm

index 68253fc..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] );
                 }
             }