X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fperldoc.PL;h=e1dd783e86e5d4c05d1fbc946c2b3ea52a7f378d;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=5d136b305cae8544128913609fb64920f94e14a5;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/perldoc.PL b/utils/perldoc.PL index 5d136b3..e1dd783 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -203,7 +203,7 @@ if (-f "Makefile.PL") { eval q{ use lib qw(. lib); 1; } or die; # don't add if superuser - if ($< && $>) { # don't be looking too hard now! + if ($< && $> && -f "blib") { # don't be looking too hard now! eval q{ use blib; 1 }; warn $@ if $@ && $opt_v; } @@ -409,7 +409,7 @@ sub page { } else { foreach my $pager (@pagers) { - last if system("$pager $tmp") == 0; + last if system("$pager \"$tmp\"") == 0; } } } @@ -439,9 +439,9 @@ foreach (@pages) { next; } print STDERR "Searching for $_\n" if $opt_v; - # We must look both in @INC for library modules and in PATH + # We must look both in @INC for library modules and in $bindir # for executables, like h2xs or perldoc itself. - my @searchdirs = @INC; + my @searchdirs = ($bindir, @INC); if ($opt_F) { next unless -r; push @found, $_ if $opt_m or containspod($_);