From a3cb178b0bad32fa8be934503d051b96a3cb1fea Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 14 May 1998 07:00:02 +0000 Subject: [win32] merge changes#872,873 from maintbranch p4raw-link: @873 on //depot/maint-5.004/perl: 990f469d529b62458be38e8659885fd26d353629 p4raw-link: @872 on //depot/maint-5.004/perl: 0b85608df162729d39cb0f96c9f88c7de0a3ceab p4raw-id: //depot/win32/perl@935 --- utils/perldoc.PL | 65 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 10 deletions(-) (limited to 'utils') diff --git a/utils/perldoc.PL b/utils/perldoc.PL index 752f335ca2..bb3d69d8f5 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -50,6 +50,7 @@ if(@ARGV<1) { die <) { + if (/^=head2\s+.*$opt_q/oi) { + $found = 1; + push @pod, "=head1 Found in $ARGV\n\n" unless $found_in{$ARGV}++; + } elsif (/^=head2/) { + $found = 0; + } + next unless $found; + push @pod, $_; + } + + if (@pod) { + if ($opt_t) { + open(FORMATTER, "| pod2text") || die "Can't start filter"; + print FORMATTER "=over 8\n\n"; + print FORMATTER @pod; + print FORMATTER "=back\n"; + close(FORMATTER); + } else { + print @pod; + } + } else { + die "No documentation for perl function `$opt_f' found\n"; + } + exit; +} + foreach (@found) { if($opt_t) { @@ -548,7 +590,10 @@ command line arguments. C also searches directories specified by the C (or C if C is not defined) and C environment variables. (The latter is so that embedded pods for executables, such as -C itself, are available.) +C itself, are available.) C will use, in order of +preference, the pager defined in C, C, or +C before trying to find a pager on its own. (C is not +used if C was told to display plain text or unformatted pod.) =head1 AUTHOR -- cgit v1.2.1