This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix `perldoc -v '$0'`
[perl5.git] / dist / Pod-Perldoc / lib / Pod / Perldoc.pm
index 95b00e3..a65a474 100644 (file)
@@ -12,7 +12,7 @@ use File::Spec::Functions qw(catfile catdir splitdir);
 use vars qw($VERSION @Pagers $Bindir $Pod2man
   $Temp_Files_Created $Temp_File_Lifetime
 );
-$VERSION = '3.15_05';
+$VERSION = '3.15_06';
 #..........................................................................
 
 BEGIN {  # Make a DEBUG constant very first thing...
@@ -911,7 +911,7 @@ sub search_perlvar {
     open(PVAR, "<", $perlvar)               # "Funk is its own reward"
         or die("Can't open $perlvar: $!");
 
-    if ( $opt =~ /^\$\d+$/ ) { # handle $1, $2, ..., $9
+    if ( $opt ne '$0' && $opt =~ /^\$\d+$/ ) { # handle $1, $2, ...
       $opt = '$<I<digits>>';
     }
     my $search_re = quotemeta($opt);