diff options
author | Bernard Quatermass <bernard@quatermass.co.uk> | 1999-11-12 23:11:43 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-11-13 18:01:24 +0000 |
commit | 57474d52a0f21ba0e58977b6c3169909bf72d6fc (patch) | |
tree | 8d47d38b6d9ad36810f611c64cc2a731556f0244 /utils | |
parent | c61b73f8bde937c1944d317f8726a7a0d32e22d4 (diff) | |
download | perl-57474d52a0f21ba0e58977b6c3169909bf72d6fc.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')
-rw-r--r-- | utils/perldoc.PL | 8 |
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; |