From: Gurusamy Sarathy Date: Wed, 4 Mar 1998 02:12:13 +0000 (+0000) Subject: [win32] maintpatches #102 and #103 to perldoc.PL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89b8affaa500ec6c1699f1c161be0e130b1eb79f;p=p5sagit%2Fp5-mst-13.2.git [win32] maintpatches #102 and #103 to perldoc.PL p4raw-id: //depot/win32/perl@726 --- diff --git a/utils/perldoc.PL b/utils/perldoc.PL index 76385e2..53219a7 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -48,11 +48,11 @@ if(@ARGV<1) { $me = $0; # Editing $0 is unportable $me =~ s,.*/,,; die < 7; + if ($opt_t + $opt_u + $opt_m + $opt_l > 1) { usage("only one of -t, -u, -m or -l") } elsif ($Is_MSWin32 || $Is_Dos) { @@ -252,6 +257,18 @@ sub searchfor { foreach (@pages) { + if ($podidx && open(PODIDX, $podidx)) { + my $searchfor = $_; + local($_); + $searchfor =~ s,::,/,g; + print STDERR "Searching for '$searchfor' in $podidx\n" if $opt_v; + while () { + chomp; + push(@found, $_) if m,/$searchfor(?:\.(?:pod|pm))?$,i; + } + close(PODIDX); + next; + } print STDERR "Searching for $_\n" if $opt_v; # We must look both in @INC for library modules and in PATH # for executables, like h2xs or perldoc itself. @@ -437,7 +454,7 @@ perldoc - Look up Perl documentation in pod format. =head1 SYNOPSIS -B [B<-h>] [B<-v>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] PageName|ModuleName|ProgramName +B [B<-h>] [B<-v>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>] [B<-X>] PageName|ModuleName|ProgramName B B<-f> BuiltinFunction @@ -486,13 +503,19 @@ 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. +Consider arguments as file names, no search in directories will be performed. =item B<-f> perlfunc The B<-f> option followed by the name of a perl built in function will extract the documentation of this function from L. +=item B<-X> use an index if present + +The B<-X> option looks for a entry whose basename matches the name given on the +command line in the file C<$Config{archlib}/pod.idx>. The pod.idx file should +contain fully qualified filenames, one per line. + =item B The item you want to look up. Nested modules (such as C) @@ -522,6 +545,9 @@ Minor updates by Andy Dougherty =cut # +# Version 1.13: Fri Feb 27 16:20:50 EST 1997 +# Gurusamy Sarathy +# -doc tweaks for -F and -X options # Version 1.12: Sat Apr 12 22:41:09 EST 1997 # Gurusamy Sarathy # -various fixes for win32