summaryrefslogtreecommitdiff
path: root/utils/perldoc.PL
diff options
context:
space:
mode:
authorBernard Quatermass <bernard@quatermass.co.uk>1999-11-12 23:11:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-13 18:01:24 +0000
commita85d71bc598e6f8a919997b62e4449e29d1fbb95 (patch)
tree8d47d38b6d9ad36810f611c64cc2a731556f0244 /utils/perldoc.PL
parent6688c047a9590c3f89dc0c1c9d684b235df668c4 (diff)
downloadperl-a85d71bc598e6f8a919997b62e4449e29d1fbb95.tar.gz
small patch for perldoc
To: perl5-porters@perl.org Message-Id: <VA.0000001c.00d1e05a@quatermass.co.uk> p4raw-id: //depot/cfgperl@4566
Diffstat (limited to 'utils/perldoc.PL')
-rw-r--r--utils/perldoc.PL8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/perldoc.PL b/utils/perldoc.PL
index e0f276af94..760a0ce770 100644
--- a/utils/perldoc.PL
+++ b/utils/perldoc.PL
@@ -51,7 +51,7 @@ if (@ARGV<1) {
my $me = $0; # Editing $0 is unportable
$me =~ s,.*/,,;
die <<EOF;
-Usage: $me [-h] [-r] [-i] [-v] [-t] [-u] [-m] [-l] [-F] [-X] PageName|ModuleName|ProgramName
+Usage: $me [-h] [-r] [-i] [-v] [-t] [-u] [-m] [-n program] [-l] [-F] [-X] PageName|ModuleName|ProgramName
$me -f PerlFunc
$me -q FAQKeywords
@@ -87,6 +87,7 @@ Options:
(-t is the default on win32)
-u Display unformatted pod text
-m Display module's file in its entirety
+ -n Specify replacement for nroff
-l Display the module's file name
-F Arguments are file names, not modules
-v Verbosely describe what's going on
@@ -121,7 +122,7 @@ if (defined $ENV{"PERLDOC"}) {
}
!NO!SUBS!
-my $getopts = "mhtluvriFf:Xq:";
+my $getopts = "mhtluvriFf:Xq:n:";
print OUT <<"!GET!OPTS!";
use vars qw( @{[map "\$opt_$_", ($getopts =~ /\w/g)]} );
@@ -132,6 +133,7 @@ getopts("$getopts") || usage;
print OUT <<'!NO!SUBS!';
usage if $opt_h;
+$opt_n = "nroff" if !$opt_n;
my $podidx;
if ($opt_X) {
@@ -321,7 +323,7 @@ sub printout {
close OUT;
}
elsif (not $opt_u) {
- my $cmd = "pod2man --lax $file | nroff -man";
+ my $cmd = "pod2man --lax $_ | $opt_n -man";
$cmd .= " | col -x" if $^O =~ /hpux/;
my $rslt = `$cmd`;
$rslt = filter_nroff($rslt) if $filter;