diff options
author | Robin Barker <RMBarker@cpan.org> | 1998-06-23 16:49:52 +0100 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-28 17:05:59 +0000 |
commit | 877622baf40bb04ea93c13070d881d4bff59d3df (patch) | |
tree | 4ed065a23f6b2638547dec4ab7fb59ab6034f2a4 /utils | |
parent | 32fcaa0b77e512c51ba8c799df5fac207028602f (diff) | |
download | perl-877622baf40bb04ea93c13070d881d4bff59d3df.tar.gz |
hand apply whitespace mutiliated perldoc.PL patches
Date: Tue, 23 Jun 98 15:49:52 BST
Message-Id: <5302.9806231449@tempest.cise.npl.co.uk>
Subject: PATCH [5.004_68] perldoc.PL
--
Date: Fri, 26 Jun 98 17:50:05 BST
Message-Id: <6834.9806261650@tempest.cise.npl.co.uk>
From: Robin Barker <rmb1@cise.npl.co.uk>
Subject: [PATCH 5.004_68] perldoc.PL
p4raw-id: //depot/perl@1225
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perldoc.PL | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL index b7b16e832c..3805f6abe4 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -306,13 +306,13 @@ foreach (@pages) { for ($i = 0; $trn = $ENV{'DCL$PATH'.$i}; $i++) { push(@searchdirs,$trn); } - push(@dirs,'perl_root:[lib.pod]') # installed pods + push(@searchdirs,'perl_root:[lib.pod]') # installed pods } else { push(@searchdirs, grep(-d, split($Config{path_sep}, $ENV{'PATH'}))); } - @files= searchfor(0,$_,@searchdirs); } + @files = searchfor(0,$_,@searchdirs); if( @files ) { print STDERR "Found as @files\n" if $opt_v; } else { @@ -352,6 +352,8 @@ if ($opt_l) { exit; } +my $lines = $ENV{LINES} || 24; + if( ! -t STDOUT ) { $no_tty = 1 } if ($Is_MSWin32) { @@ -410,8 +412,6 @@ if ($opt_f) { ++$found if /^\w/; # found descriptive text } if (@pod) { - my $lines = $ENV{LINES} || 24; - if ($opt_t) { open(FORMATTER, "| pod2text") || die "Can't start filter"; print FORMATTER "=over 8\n\n"; @@ -458,11 +458,18 @@ if ($opt_q) { print FORMATTER @pod; print FORMATTER "=back\n"; close(FORMATTER); - } else { + } elsif (@pod < $lines-2) { print @pod; + } else { + foreach $pager (@pagers) { + open (PAGER, "| $pager") or next; + print PAGER @pod ; + close(PAGER) or next; + last; + } } } else { - die "No documentation for perl function `$opt_f' found\n"; + die "No documentation for perl FAQ keyword `$opt_q' found\n"; } exit; } |