diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1997-12-11 14:37:00 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-12-17 10:58:35 +0000 |
commit | cce34969d5db0324ad932993341d3b01490c4690 (patch) | |
tree | d018b026fda8f9aa299850110331b4743941633b /utils | |
parent | fdb47d669a38a03e8977ffb442224032cc63946a (diff) | |
download | perl-cce34969d5db0324ad932993341d3b01490c4690.tar.gz |
Allow "perldoc -F filename":
Subject: 5.004_55: Patch to perldoc
p4raw-id: //depot/perl@368
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perldoc.PL | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL index d223a9aaf9..0ac8e0a806 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -48,7 +48,7 @@ if(@ARGV<1) { $me = $0; # Editing $0 is unportable $me =~ s,.*/,,; die <<EOF; -Usage: $me [-h] [-v] [-t] [-u] [-m] [-l] PageName|ModuleName|ProgramName +Usage: $me [-h] [-v] [-t] [-u] [-m] [-l] [-F] PageName|ModuleName|ProgramName $me -f PerlFunc We suggest you use "perldoc perldoc" to get aquainted @@ -80,6 +80,7 @@ Options: -u Display unformatted pod text -m Display modules file in its entirety -l Display the modules file name + -F Arguments are file names, not modules -v Verbosely describe what's going on PageName|ModuleName... @@ -104,7 +105,7 @@ use Text::ParseWords; unshift(@ARGV,shellwords($ENV{"PERLDOC"})); -getopts("mhtluvf:") || usage; +getopts("mhtluvFf:") || usage; usage if $opt_h || $opt_h; # avoid -w warning @@ -254,6 +255,11 @@ foreach (@pages) { # We must look both in @INC for library modules and in PATH # for executables, like h2xs or perldoc itself. @searchdirs = @INC; + if ($opt_F) { + next unless -r; + push @found, $_ if $opt_m or containspod($_); + next; + } unless ($opt_m) { if ($Is_VMS) { my($i,$trn); @@ -472,6 +478,10 @@ the file for you and simply hand it off for display. Display the file name of the module found. +=item B<-F> file names + +Consider arguments as file names, no search in directories should be performed. + =item B<-f> perlfunc The B<-f> option followed by the name of a perl built in function will |