diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-08 21:48:22 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-08 21:48:22 +0000 |
commit | 7d74db03f1398d522128bfcb8a1ea0b26547d290 (patch) | |
tree | 4cdb2a3d8215ed85384452e0b1820ce698138e0b /utils/perldoc.PL | |
parent | 377b21bb1127ac5ca00091f9cc395d44f5adff24 (diff) | |
download | perl-7d74db03f1398d522128bfcb8a1ea0b26547d290.tar.gz |
make perldoc -f grok nested =items
p4raw-id: //depot/perl@3336
Diffstat (limited to 'utils/perldoc.PL')
-rw-r--r-- | utils/perldoc.PL | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL index c351fbf464..e591479279 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -429,13 +429,20 @@ if ($opt_f) { # Look for our function my $found = 0; + my $inlist = 0; while (<PFUNC>) { if (/^=item\s+\Q$search_string\E\b/o) { $found = 1; } elsif (/^=item/) { - last if $found > 1; + last if $found > 1 and not $inlist; } next unless $found; + if (/^=over/) { + ++$inlist; + } + elsif (/^=back/) { + --$inlist; + } push @pod, $_; ++$found if /^\w/; # found descriptive text } |