summaryrefslogtreecommitdiff
path: root/utils/perldoc.PL
diff options
context:
space:
mode:
Diffstat (limited to 'utils/perldoc.PL')
-rw-r--r--utils/perldoc.PL8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL
index 5d136b305c..e1dd783e86 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($_);