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

EXIT STATUS

203       As long as all documents processed result in some output, even if that
204       output includes errata (a "POD ERRORS" section generated with
205       "--errors=pod"), pod2man will exit with status 0.  If any of the
206       documents being processed do not result in an output document, pod2man
207       will exit with status 1.  If there are syntax errors in a POD document
208       being processed and the error handling style is set to the default of
209       "die", pod2man will abort immediately with exit status 255.
210

DIAGNOSTICS

212       If pod2man fails with errors, see Pod::Man and Pod::Simple for
213       information about what those errors might mean.
214

EXAMPLES

216           pod2man program > program.1
217           pod2man SomeModule.pm /usr/perl/man/man3/SomeModule.3
218           pod2man --section=7 note.pod > note.7
219
220       If you would like to print out a lot of man page continuously, you
221       probably want to set the C and D registers to set contiguous page
222       numbering and even/odd paging, at least on some versions of man(7).
223
224           troff -man -rC1 -rD1 perl.1 perldata.1 perlsyn.1 ...
225
226       To get index entries on "STDERR", turn on the F register, as in:
227
228           troff -man -rF1 perl.1
229
230       The indexing merely outputs messages via ".tm" for each major page,
231       section, subsection, item, and any "X<>" directives.  See Pod::Man for
232       more details.
233

BUGS

235       Lots of this documentation is duplicated from Pod::Man.
236

SEE ALSO

238       Pod::Man, Pod::Simple, man(1), nroff(1), perlpod(1), podchecker(1),
239       perlpodstyle(1), troff(1), man(7)
240
241       The man page documenting the an macro set may be man(5) instead of
242       man(7) on your system.
243
244       The current version of this script is always available from its web
245       site at <http://www.eyrie.org/~eagle/software/podlators/>.  It is also
246       part of the Perl core distribution as of 5.6.0.
247

AUTHOR

249       Russ Allbery <rra@stanford.edu>, based very heavily on the original
250       pod2man by Larry Wall and Tom Christiansen.
251
253       Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013 Russ
254       Allbery <rra@stanford.edu>.
255
256       This program is free software; you may redistribute it and/or modify it
257       under the same terms as Perl itself.
258
259
260
261perl v5.16.3                      2013-01-02                        POD2MAN(1)
Impressum