1POD2MAN(1)            User Contributed Perl Documentation           POD2MAN(1)
2
3
4

NAME

6       pod2man - Convert POD data to formatted *roff input
7

SYNOPSIS

9       pod2man [--center=string] [--date=string] [--errors=style]
10           [--fixed=font] [--fixedbold=font] [--fixeditalic=font]
11           [--fixedbolditalic=font] [--name=name] [--nourls]
12           [--official] [--release=version] [--section=manext]
13           [--quotes=quotes] [--lquote=quote] [--rquote=quote]
14           [--stderr] [--utf8] [--verbose] [input [output] ...]
15
16       pod2man --help
17

DESCRIPTION

19       pod2man is a front-end for Pod::Man, using it to generate *roff input
20       from POD source.  The resulting *roff code is suitable for display on a
21       terminal using nroff(1), normally via man(1), or printing using
22       troff(1).
23
24       input is the file to read for POD source (the POD can be embedded in
25       code).  If input isn't given, it defaults to "STDIN".  output, if
26       given, is the file to which to write the formatted output.  If output
27       isn't given, the formatted output is written to "STDOUT".  Several POD
28       files can be processed in the same pod2man invocation (saving module
29       load and compile times) by providing multiple pairs of input and output
30       files on the command line.
31
32       --section, --release, --center, --date, and --official can be used to
33       set the headers and footers to use; if not given, Pod::Man will assume
34       various defaults.  See below or Pod::Man for details.
35
36       pod2man assumes that your *roff formatters have a fixed-width font
37       named "CW".  If yours is called something else (like "CR"), use --fixed
38       to specify it.  This generally only matters for troff output for
39       printing.  Similarly, you can set the fonts used for bold, italic, and
40       bold italic fixed-width output.
41
42       Besides the obvious pod conversions, Pod::Man, and therefore pod2man
43       also takes care of formatting func(), func(n), and simple variable
44       references like $foo or @bar so you don't have to use code escapes for
45       them; complex expressions like $fred{'stuff'} will still need to be
46       escaped, though.  It also translates dashes that aren't used as hyphens
47       into en dashes, makes long dashes--like this--into proper em dashes,
48       fixes "paired quotes," and takes care of several other troff-specific
49       tweaks.  See Pod::Man for complete information.
50

OPTIONS

52       -c string, --center=string
53           Sets the centered page header for the ".TH" macro to string.  The
54           default is "User Contributed Perl Documentation", but also see
55           --official below.
56
57       -d string, --date=string
58           Set the left-hand footer string for the ".TH" macro to string.  By
59           default, the modification date of the input file will be used, or
60           the current date if input comes from "STDIN", and will be based on
61           UTC (so that the output will be reproducible regardless of local
62           time zone).
63
64       --errors=style
65           Set the error handling style.  "die" says to throw an exception on
66           any POD formatting error.  "stderr" says to report errors on
67           standard error, but not to throw an exception.  "pod" says to
68           include a POD ERRORS section in the resulting documentation
69           summarizing the errors.  "none" ignores POD errors entirely, as
70           much as possible.
71
72           The default is "die".
73
74       --fixed=font
75           The fixed-width font to use for verbatim text and code.  Defaults
76           to "CW".  Some systems may want "CR" instead.  Only matters for
77           troff(1) output.
78
79       --fixedbold=font
80           Bold version of the fixed-width font.  Defaults to "CB".  Only
81           matters for troff(1) output.
82
83       --fixeditalic=font
84           Italic version of the fixed-width font (actually, something of a
85           misnomer, since most fixed-width fonts only have an oblique
86           version, not an italic version).  Defaults to "CI".  Only matters
87           for troff(1) output.
88
89       --fixedbolditalic=font
90           Bold italic (probably actually oblique) version of the fixed-width
91           font.  Pod::Man doesn't assume you have this, and defaults to "CB".
92           Some systems (such as Solaris) have this font available as "CX".
93           Only matters for troff(1) output.
94
95       -h, --help
96           Print out usage information.
97
98       -l, --lax
99           No longer used.  pod2man used to check its input for validity as a
100           manual page, but this should now be done by podchecker(1) instead.
101           Accepted for backward compatibility; this option no longer does
102           anything.
103
104       --lquote=quote
105       --rquote=quote
106           Sets the quote marks used to surround C<> text.  --lquote sets the
107           left quote mark and --rquote sets the right quote mark.  Either may
108           also be set to the special value "none", in which case no quote
109           mark is added on that side of C<> text (but the font is still
110           changed for troff output).
111
112           Also see the --quotes option, which can be used to set both quotes
113           at once.  If both --quotes and one of the other options is set,
114           --lquote or --rquote overrides --quotes.
115
116       -n name, --name=name
117           Set the name of the manual page for the ".TH" macro to name.
118           Without this option, the manual name is set to the uppercased base
119           name of the file being converted unless the manual section is 3, in
120           which case the path is parsed to see if it is a Perl module path.
121           If it is, a path like ".../lib/Pod/Man.pm" is converted into a name
122           like "Pod::Man".  This option, if given, overrides any automatic
123           determination of the name.
124
125           Although one does not have to follow this convention, be aware that
126           the convention for UNIX man pages for commands is for the man page
127           title to be in all-uppercase, even if the command isn't.
128
129           This option is probably not useful when converting multiple POD
130           files at once.
131
132           When converting POD source from standard input, the name will be
133           set to "STDIN" if this option is not provided.  Providing this
134           option is strongly recommended to set a meaningful manual page
135           name.
136
137       --nourls
138           Normally, L<> formatting codes with a URL but anchor text are
139           formatted to show both the anchor text and the URL.  In other
140           words:
141
142               L<foo|http://example.com/>
143
144           is formatted as:
145
146               foo <http://example.com/>
147
148           This flag, if given, suppresses the URL when anchor text is given,
149           so this example would be formatted as just "foo".  This can produce
150           less cluttered output in cases where the URLs are not particularly
151           important.
152
153       -o, --official
154           Set the default header to indicate that this page is part of the
155           standard Perl release, if --center is not also given.
156
157       -q quotes, --quotes=quotes
158           Sets the quote marks used to surround C<> text to quotes.  If
159           quotes is a single character, it is used as both the left and right
160           quote.  Otherwise, it is split in half, and the first half of the
161           string is used as the left quote and the second is used as the
162           right quote.
163
164           quotes may also be set to the special value "none", in which case
165           no quote marks are added around C<> text (but the font is still
166           changed for troff output).
167
168           Also see the --lquote and --rquote options, which can be used to
169           set the left and right quotes independently.  If both --quotes and
170           one of the other options is set, --lquote or --rquote overrides
171           --quotes.
172
173       -r version, --release=version
174           Set the centered footer for the ".TH" macro to version.  By
175           default, this is set to the version of Perl you run pod2man under.
176           Setting this to the empty string will cause some *roff
177           implementations to use the system default value.
178
179           Note that some system "an" macro sets assume that the centered
180           footer will be a modification date and will prepend something like
181           "Last modified: ".  If this is the case for your target system, you
182           may want to set --release to the last modified date and --date to
183           the version number.
184
185       -s string, --section=string
186           Set the section for the ".TH" macro.  The standard section
187           numbering convention is to use 1 for user commands, 2 for system
188           calls, 3 for functions, 4 for devices, 5 for file formats, 6 for
189           games, 7 for miscellaneous information, and 8 for administrator
190           commands.  There is a lot of variation here, however; some systems
191           (like Solaris) use 4 for file formats, 5 for miscellaneous
192           information, and 7 for devices.  Still others use 1m instead of 8,
193           or some mix of both.  About the only section numbers that are
194           reliably consistent are 1, 2, and 3.
195
196           By default, section 1 will be used unless the file ends in ".pm",
197           in which case section 3 will be selected.
198
199       --stderr
200           By default, pod2man dies if any errors are detected in the POD
201           input.  If --stderr is given and no --errors flag is present,
202           errors are sent to standard error, but pod2man does not abort.
203           This is equivalent to "--errors=stderr" and is supported for
204           backward compatibility.
205
206       -u, --utf8
207           By default, pod2man produces the most conservative possible *roff
208           output to try to ensure that it will work with as many different
209           *roff implementations as possible.  Many *roff implementations
210           cannot handle non-ASCII characters, so this means all non-ASCII
211           characters are converted either to a *roff escape sequence that
212           tries to create a properly accented character (at least for troff
213           output) or to "X".
214
215           This option says to instead output literal UTF-8 characters.  If
216           your *roff implementation can handle it, this is the best output
217           format to use and avoids corruption of documents containing non-
218           ASCII characters.  However, be warned that *roff source with
219           literal UTF-8 characters is not supported by many implementations
220           and may even result in segfaults and other bad behavior.
221
222           Be aware that, when using this option, the input encoding of your
223           POD source should be properly declared unless it's US-ASCII.
224           Pod::Simple will attempt to guess the encoding and may be
225           successful if it's Latin-1 or UTF-8, but it will warn, which by
226           default results in a pod2man failure.  Use the "=encoding" command
227           to declare the encoding.  See perlpod(1) for more information.
228
229       -v, --verbose
230           Print out the name of each output file as it is being generated.
231

EXIT STATUS

233       As long as all documents processed result in some output, even if that
234       output includes errata (a "POD ERRORS" section generated with
235       "--errors=pod"), pod2man will exit with status 0.  If any of the
236       documents being processed do not result in an output document, pod2man
237       will exit with status 1.  If there are syntax errors in a POD document
238       being processed and the error handling style is set to the default of
239       "die", pod2man will abort immediately with exit status 255.
240

DIAGNOSTICS

242       If pod2man fails with errors, see Pod::Man and Pod::Simple for
243       information about what those errors might mean.
244

EXAMPLES

246           pod2man program > program.1
247           pod2man SomeModule.pm /usr/perl/man/man3/SomeModule.3
248           pod2man --section=7 note.pod > note.7
249
250       If you would like to print out a lot of man page continuously, you
251       probably want to set the C and D registers to set contiguous page
252       numbering and even/odd paging, at least on some versions of man(7).
253
254           troff -man -rC1 -rD1 perl.1 perldata.1 perlsyn.1 ...
255
256       To get index entries on "STDERR", turn on the F register, as in:
257
258           troff -man -rF1 perl.1
259
260       The indexing merely outputs messages via ".tm" for each major page,
261       section, subsection, item, and any "X<>" directives.  See Pod::Man for
262       more details.
263

BUGS

265       Lots of this documentation is duplicated from Pod::Man.
266

AUTHOR

268       Russ Allbery <rra@cpan.org>, based very heavily on the original pod2man
269       by Larry Wall and Tom Christiansen.
270
272       Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2018 Russ Allbery
273       <rra@cpan.org>
274
275       This program is free software; you may redistribute it and/or modify it
276       under the same terms as Perl itself.
277

SEE ALSO

279       Pod::Man, Pod::Simple, man(1), nroff(1), perlpod(1), podchecker(1),
280       perlpodstyle(1), troff(1), man(7)
281
282       The man page documenting the an macro set may be man(5) instead of
283       man(7) on your system.
284
285       The current version of this script is always available from its web
286       site at <https://www.eyrie.org/~eagle/software/podlators/>.  It is also
287       part of the Perl core distribution as of 5.6.0.
288
289
290
291perl v5.28.1                      2018-05-07                        POD2MAN(1)
Impressum