.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Pod::Man 3"
.TH Pod::Man 3 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
Pod::Man \- Convert POD data to formatted *roff input
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& use Pod::Man;
\& my $parser = Pod::Man->new (release => $VERSION, section => 8);
.Ve
.PP
.Vb 2
\& # Read POD from STDIN and write to STDOUT.
\& $parser->parse_from_filehandle;
.Ve
.PP
.Vb 2
\& # Read POD from file.pod and write to file.1.
\& $parser->parse_from_file ('file.pod', 'file.1');
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Pod::Man is a module to convert documentation in the \s-1POD\s0 format (the
preferred language for documenting Perl) into *roff input using the man
macro set. The resulting *roff code is suitable for display on a terminal
using \fInroff\fR\|(1), normally via \fIman\fR\|(1), or printing using \fItroff\fR\|(1).
It is conventionally invoked using the driver script \fBpod2man\fR, but it can
also be used directly.
.PP
As a derived class from Pod::Parser, Pod::Man supports the same methods and
interfaces. See Pod::Parser for all the details; briefly, one creates a
new parser with \f(CW\*(C`Pod::Man\->new()\*(C'\fR and then calls either
\&\fIparse_from_filehandle()\fR or \fIparse_from_file()\fR.
.PP
\&\fInew()\fR can take options, in the form of key/value pairs that control the
behavior of the parser. See below for details.
.PP
If no options are given, Pod::Man uses the name of the input file with any
trailing \f(CW\*(C`.pod\*(C'\fR, \f(CW\*(C`.pm\*(C'\fR, or \f(CW\*(C`.pl\*(C'\fR stripped as the man page title, to
section 1 unless the file ended in \f(CW\*(C`.pm\*(C'\fR in which case it defaults to
section 3, to a centered title of \*(L"User Contributed Perl Documentation\*(R", to
a centered footer of the Perl version it is run with, and to a left-hand
footer of the modification date of its input (or the current date if given
\&\s-1STDIN\s0 for input).
.PP
Pod::Man assumes that your *roff formatters have a fixed-width font named
\&\s-1CW\s0. If yours is called something else (like \s-1CR\s0), use the \f(CW\*(C`fixed\*(C'\fR option to
specify it. This generally only matters for troff output for printing.
Similarly, you can set the fonts used for bold, italic, and bold italic
fixed-width output.
.PP
Besides the obvious pod conversions, Pod::Man also takes care of formatting
\&\fIfunc()\fR, \fIfunc\fR\|(3), and simple variable references like \f(CW$foo\fR or \f(CW@bar\fR so you
don't have to use code escapes for them; complex expressions like
\&\f(CW$fred{'stuff'}\fR will still need to be escaped, though. It also translates
dashes that aren't used as hyphens into en dashes, makes long dashes\*(--like
this\*(--into proper em dashes, fixes \*(L"paired quotes,\*(R" makes \*(C+ look right,
puts a little space between double underbars, makes \s-1ALLCAPS\s0 a teeny bit
smaller in \fBtroff\fR, and escapes stuff that *roff treats as special so that
you don't have to.
.PP
The recognized options to \fInew()\fR are as follows. All options take a single
argument.
.IP "center" 4
.IX Item "center"
Sets the centered page header to use instead of \*(L"User Contributed Perl
Documentation\*(R".
.IP "date" 4
.IX Item "date"
Sets the left-hand footer. By default, the modification date of the input
file will be used, or the current date if \fIstat()\fR can't find that file (the
case if the input is from \s-1STDIN\s0), and the date will be formatted as
\&\s-1YYYY\-MM\-DD\s0.
.IP "fixed" 4
.IX Item "fixed"
The fixed-width font to use for vertabim text and code. Defaults to \s-1CW\s0.
Some systems may want \s-1CR\s0 instead. Only matters for \fBtroff\fR output.
.IP "fixedbold" 4
.IX Item "fixedbold"
Bold version of the fixed-width font. Defaults to \s-1CB\s0. Only matters for
\&\fBtroff\fR output.
.IP "fixeditalic" 4
.IX Item "fixeditalic"
Italic version of the fixed-width font (actually, something of a misnomer,
since most fixed-width fonts only have an oblique version, not an italic
version). Defaults to \s-1CI\s0. Only matters for \fBtroff\fR output.
.IP "fixedbolditalic" 4
.IX Item "fixedbolditalic"
Bold italic (probably actually oblique) version of the fixed-width font.
Pod::Man doesn't assume you have this, and defaults to \s-1CB\s0. Some systems
(such as Solaris) have this font available as \s-1CX\s0. Only matters for \fBtroff\fR
output.
.IP "name" 4
.IX Item "name"
Set the name of the manual page. 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 \f(CW\*(C`.../lib/Pod/Man.pm\*(C'\fR is converted into
a name like \f(CW\*(C`Pod::Man\*(C'\fR. This option, if given, overrides any automatic
determination of the name.
.IP "quotes" 4
.IX Item "quotes"
Sets the quote marks used to surround C<> text. If the value is a
single character, it is used as both the left and right quote; if it is two
characters, the first character is used as the left quote and the second as
the right quoted; and if it is four characters, the first two are used as
the left quote and the second two as the right quote.
.Sp
This may also be set to the special value \f(CW\*(C`none\*(C'\fR, in which case no quote
marks are added around C<> text (but the font is still changed for troff
output).
.IP "release" 4
.IX Item "release"
Set the centered footer. By default, this is the version of Perl you run
Pod::Man under. Note that some system an macro sets assume that the
centered footer will be a modification date and will prepend something like
\&\*(L"Last modified: \*(R"; if this is the case, you may want to set \f(CW\*(C`release\*(C'\fR to
the last modified date and \f(CW\*(C`date\*(C'\fR to the version number.
.IP "section" 4
.IX Item "section"
Set the section for the \f(CW\*(C`.TH\*(C'\fR macro. The standard section numbering
convention is to use 1 for user commands, 2 for system calls, 3 for
functions, 4 for devices, 5 for file formats, 6 for games, 7 for
miscellaneous information, and 8 for administrator commands. There is a lot
of variation here, however; some systems (like Solaris) use 4 for file
formats, 5 for miscellaneous information, and 7 for devices. Still others
use 1m instead of 8, or some mix of both. About the only section numbers
that are reliably consistent are 1, 2, and 3.
.Sp
By default, section 1 will be used unless the file ends in .pm in which case
section 3 will be selected.
.PP
The standard Pod::Parser method \fIparse_from_filehandle()\fR takes up to two
arguments, the first being the file handle to read \s-1POD\s0 from and the second
being the file handle to write the formatted output to. The first defaults
to \s-1STDIN\s0 if not given, and the second defaults to \s-1STDOUT\s0. The method
\&\fIparse_from_file()\fR is almost identical, except that its two arguments are the
input and output disk files instead. See Pod::Parser for the specific
details.
.SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS"
.ie n .IP "roff font should be 1 or 2 chars, not ""%s""" 4
.el .IP "roff font should be 1 or 2 chars, not ``%s''" 4
.IX Item "roff font should be 1 or 2 chars, not %s"
(F) You specified a *roff font (using \f(CW\*(C`fixed\*(C'\fR, \f(CW\*(C`fixedbold\*(C'\fR, etc.) that
wasn't either one or two characters. Pod::Man doesn't support *roff fonts
longer than two characters, although some *roff extensions do (the canonical
versions of \fBnroff\fR and \fBtroff\fR don't either).
.ie n .IP "Invalid link %s" 4
.el .IP "Invalid link \f(CW%s\fR" 4
.IX Item "Invalid link %s"
(W) The \s-1POD\s0 source contained a \f(CW\*(C`L<>\*(C'\fR formatting code that
Pod::Man was unable to parse. You should never see this error message; it
probably indicates a bug in Pod::Man.
.ie n .IP "Invalid quote specification ""%s""" 4
.el .IP "Invalid quote specification ``%s''" 4
.IX Item "Invalid quote specification %s"
(F) The quote specification given (the quotes option to the constructor) was
invalid. A quote specification must be one, two, or four characters long.
.ie n .IP "%s:%d: Unknown command paragraph ""%s""." 4
.el .IP "%s:%d: Unknown command paragraph ``%s''." 4
.IX Item "%s:%d: Unknown command paragraph %s."
(W) The \s-1POD\s0 source contained a non-standard command paragraph (something of
the form \f(CW\*(C`=command args\*(C'\fR) that Pod::Man didn't know about. It was ignored.
.IP "%s:%d: Unknown escape E<%s>" 4
.IX Item "%s:%d: Unknown escape E<%s>"
(W) The \s-1POD\s0 source contained an \f(CW\*(C`E<>\*(C'\fR escape that Pod::Man didn't
know about. \f(CW\*(C`E<%s>\*(C'\fR was printed verbatim in the output.
.ie n .IP "%s:%d: Unknown formatting code %s" 4
.el .IP "%s:%d: Unknown formatting code \f(CW%s\fR" 4
.IX Item "%s:%d: Unknown formatting code %s"
(W) The \s-1POD\s0 source contained a non-standard formatting code (something of
the form \f(CW\*(C`X<>\*(C'\fR) that Pod::Man didn't know about. It was ignored.
.IP "%s:%d: Unmatched =back" 4
.IX Item "%s:%d: Unmatched =back"
(W) Pod::Man encountered a \f(CW\*(C`=back\*(C'\fR command that didn't correspond to an
\&\f(CW\*(C`=over\*(C'\fR command.
.SH "BUGS"
.IX Header "BUGS"
Eight-bit input data isn't handled at all well at present. The correct
approach would be to map E<> escapes to the appropriate \s-1UTF\-8\s0
characters and then do a translation pass on the output according to the
user-specified output character set. Unfortunately, we can't send eight-bit
data directly to the output unless the user says this is okay, since some
vendor *roff implementations can't handle eight-bit data. If the *roff
implementation can, however, that's far superior to the current hacked
characters that only work under troff.
.PP
There is currently no way to turn off the guesswork that tries to format
unmarked text appropriately, and sometimes it isn't wanted (particularly
when using \s-1POD\s0 to document something other than Perl).
.PP
The \s-1NAME\s0 section should be recognized specially and index entries emitted
for everything in that section. This would have to be deferred until the
next section, since extraneous things in \s-1NAME\s0 tends to confuse various man
page processors.
.PP
Pod::Man doesn't handle font names longer than two characters. Neither do
most \fBtroff\fR implementations, but \s-1GNU\s0 troff does as an extension. It would
be nice to support as an option for those who want to use it.
.PP
The preamble added to each output file is rather verbose, and most of it is
only necessary in the presence of E<> escapes for non-ASCII
characters. It would ideally be nice if all of those definitions were only
output if needed, perhaps on the fly as the characters are used.
.PP
Pod::Man is excessively slow.
.SH "CAVEATS"
.IX Header "CAVEATS"
The handling of hyphens and em dashes is somewhat fragile, and one may get
the wrong one under some circumstances. This should only matter for
\&\fBtroff\fR output.
.PP
When and whether to use small caps is somewhat tricky, and Pod::Man doesn't
necessarily get it right.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Pod::Parser, \fIperlpod\fR\|(1), \fIpod2man\fR\|(1), \fInroff\fR\|(1), \fItroff\fR\|(1),
\&\fIman\fR\|(1), \fIman\fR\|(7)
.PP
Ossanna, Joseph F., and Brian W. Kernighan. \*(L"Troff User's Manual,\*(R"
Computing Science Technical Report No. 54, \s-1AT&T\s0 Bell Laboratories. This is
the best documentation of standard \fBnroff\fR and \fBtroff\fR. At the time of
this writing, it's available at
<http://www.cs.bell\-labs.com/cm/cs/cstr.html>.
.PP
The man page documenting the man macro set may be \fIman\fR\|(5) instead of
\&\fIman\fR\|(7) on your system. Also, please see \fIpod2man\fR\|(1) for extensive
documentation on writing manual pages if you've not done it before and
aren't familiar with the conventions.
.PP
The current version of this module is always available from its web site at
<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
Perl core distribution as of 5.6.0.
.SH "AUTHOR"
.IX Header "AUTHOR"
Russ Allbery <rra@stanford.edu>, based \fIvery\fR heavily on the original
\&\fBpod2man\fR by Tom Christiansen <tchrist@mox.perl.com>.
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>.
.PP
This program is free software; you may redistribute it and/or modify it
under the same terms as Perl itself.
|