X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fpod2man.PL;h=b1b1a55841434cebff67eea625494a65f9008261;hb=62703e7218aceb3f5d30f70a2307dd02e5eb8c63;hp=5a1deeaed38d3e4d7eb5601295f132bba73669fe;hpb=59548ecaeaf22737b5c8a75235f5e142c16de75d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 5a1deea..b1b1a55 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -36,7 +36,7 @@ $Config{startperl} print OUT <<'!NO!SUBS!'; # pod2man -- Convert POD data to formatted *roff input. -# $Id: pod2man.PL,v 1.7 2001/10/20 08:24:15 eagle Exp $ +# $Id: pod2man.PL,v 1.10 2002/07/15 05:45:56 eagle Exp $ # # Copyright 1999, 2000, 2001 by Russ Allbery # @@ -64,10 +64,10 @@ my $stdin; # allowing short forms as well. --lax is currently ignored. my %options; Getopt::Long::config ('bundling_override'); -GetOptions (\%options, 'section|s=s', 'release|r=s', 'center|c=s', +GetOptions (\%options, 'section|s=s', 'release|r:s', 'center|c=s', 'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s', - 'fixedbolditalic=s', 'official|o', 'quotes|q=s', 'lax|l', - 'help|h', 'verbose|v') or exit 1; + 'fixedbolditalic=s', 'name|n=s', 'official|o', 'quotes|q=s', + 'lax|l', 'help|h', 'verbose|v') or exit 1; pod2usage (0) if $options{help}; # Official sets --center, but don't override things explicitly set. @@ -79,6 +79,10 @@ if ($options{official} && !defined $options{center}) { my $verbose = $options{verbose}; delete $options{verbose}; +# This isn't a valid Pod::Man option and is only accepted for backwards +# compatibility. +delete $options{lax}; + # Initialize and run the formatter, pulling a pair of input and output off at # a time. my $parser = Pod::Man->new (%options); @@ -100,8 +104,9 @@ pod2man - Convert POD data to formatted *roff input pod2man [B<--section>=I] [B<--release>=I] [B<--center>=I] [B<--date>=I] [B<--fixed>=I] [B<--fixedbold>=I] [B<--fixeditalic>=I] -[B<--fixedbolditalic>=I] [B<--official>] [B<--lax>] -[B<--quotes>=I] [B<--verbose>] [I [I] ...] +[B<--fixedbolditalic>=I] [B<--name>=I] [B<--official>] +[B<--lax>] [B<--quotes>=I] [B<--verbose>] +[I [I] ...] pod2man B<--help> @@ -182,8 +187,22 @@ Print out usage information. =item B<-l>, B<--lax> -Don't complain when required sections are missing. Not currently used, as -POD checking functionality is not yet implemented in Pod::Man. +No longer used. B used to check its input for validity as a manual +page, but this should now be done by L instead. Accepted for +backwards compatibility; this option no longer does anything. + +=item B<-n> I, B<--name>=I + +Set the name of the manual page to I. Without this option, the manual +name is set to the uppercased base name of the file being converted unless +the manual section is 3, in which case the path is parsed to see if it is a +Perl module path. If it is, a path like C<.../lib/Pod/Man.pm> is converted +into a name like C. This option, if given, overrides any +automatic determination of the name. + +Note that this option is probably not useful when converting multiple POD +files at once. The convention for Unix man pages for commands is for the +man page title to be in all-uppercase even if the command isn't. =item B<-o>, B<--official> @@ -260,8 +279,6 @@ L for more details. Lots of this documentation is duplicated from L. -POD checking and the corresponding B<--lax> option don't work yet. - =head1 NOTES For those not sure of the proper layout of a man page, here are some notes @@ -431,9 +448,8 @@ Other man pages to check out, like man(1), man(7), makewhatis(8), or catman(8). Normally a simple list of man pages separated by commas, or a paragraph giving the name of a reference work. Man page references, if they use the standard C form, don't have to be enclosed in -LEE, but other things in this section probably should be when -appropriate. You may need to use the C...|...E> syntax to keep -B and B from being too verbose; see perlpod(1). +LEE (although it's recommended), but other things in this section +probably should be when appropriate. If the package has a mailing list, include a URL or subscription instructions here. @@ -498,16 +514,20 @@ to later edit the documentation. Note that many existing translators or URLs when wrapped in LEE, so don't do that. For additional information that may be more accurate for your specific -system, see either man(5) or man(7) depending on your system manual section -numbering conventions. +system, see either L or L depending on your system manual +section numbering conventions. =head1 SEE ALSO -L, L, man(1), nroff(1), -troff(1), man(7) +L, L, L, L, L, +L, L + +The man page documenting the an macro set may be L instead of +L on your system. -The man page documenting the an macro set may be man(5) instead of man(7) on -your system. +The current version of this script is always available from its web site at +L. It is also part of the +Perl core distribution as of 5.6.0. =head1 AUTHOR