summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMark-Jason Dominus <mjd@plover.com>1998-10-04 10:48:11 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-10-06 03:43:32 +0000
commitc437c45787750ba4b841b3d6c173dab1a4cd3419 (patch)
tree04d6bacae0ceaa910be694efd587df0a7114d7db /utils
parente2f80c046bf1daa0a8bbb0e379811f169b392b56 (diff)
downloadperl-c437c45787750ba4b841b3d6c173dab1a4cd3419.tar.gz
PATCH: perldoc -f does not locate -e, -r, -x, etc.
Message-ID: <19981004184811.16048.qmail@plover.com> p4raw-id: //depot/perl@1926
Diffstat (limited to 'utils')
-rw-r--r--utils/perldoc.PL5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL
index 875cd25144..b680b90563 100644
--- a/utils/perldoc.PL
+++ b/utils/perldoc.PL
@@ -408,6 +408,9 @@ if ($opt_f) {
my $perlfunc = shift @found;
open(PFUNC, $perlfunc) or die "Can't open $perlfunc: $!";
+ # Functions like -r, -e, etc. are listed under `-X'.
+ my $search_string = ($opt_f =~ /^-[rwxoRWXOeszfdlpSbctugkTBMAC]$/) ? 'I<-X' : $opt_f ;
+
# Skip introduction
while (<PFUNC>) {
last if /^=head2 Alphabetical Listing of Perl Functions/;
@@ -417,7 +420,7 @@ if ($opt_f) {
my $found = 0;
my @pod;
while (<PFUNC>) {
- if (/^=item\s+\Q$opt_f\E\b/o) {
+ if (/^=item\s+\Q$search_string\E\b/o) {
$found = 1;
} elsif (/^=item/) {
last if $found > 1;