projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
377b21b
)
make perldoc -f grok nested =items
author
Gurusamy Sarathy
<gsar@cpan.org>
Sat, 8 May 1999 21:48:22 +0000
(21:48 +0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Sat, 8 May 1999 21:48:22 +0000
(21:48 +0000)
p4raw-id: //depot/perl@3336
utils/perldoc.PL
patch
|
blob
|
history
diff --git
a/utils/perldoc.PL
b/utils/perldoc.PL
index
c351fbf
..
e591479
100644
(file)
--- 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
}