.\" 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 "PERLPOD 1"
.TH PERLPOD 1 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
perlpod \- the Plain Old Documentation format
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Pod is a simple-to-use markup language used for writing documentation
for Perl, Perl programs, and Perl modules.
.PP
Translators are available for converting Pod to various formats
like plain text, \s-1HTML\s0, man pages, and more.
.PP
Pod markup consists of three basic kinds of paragraphs:
ordinary,
verbatim, and
command.
.Sh "Ordinary Paragraph"
.IX Subsection "Ordinary Paragraph"
Most paragraphs in your documentation will be ordinary blocks
of text, like this one. You can simply type in your text without
any markup whatsoever, and with just a blank line before and
after. When it gets formatted, it will undergo minimal formatting,
like being rewrapped, probably put into a proportionally spaced
font, and maybe even justified.
.PP
You can use formatting codes in ordinary paragraphs, for \fBbold\fR,
\&\fIitalic\fR, \f(CW\*(C`code\-style\*(C'\fR, hyperlinks, and more. Such
codes are explained in the "Formatting Codes"
section, below.
.Sh "Verbatim Paragraph"
.IX Subsection "Verbatim Paragraph"
Verbatim paragraphs are usually used for presenting a codeblock or
other text which does not require any special parsing or formatting,
and which shouldn't be wrapped.
.PP
A verbatim paragraph is distinguished by having its first character
be a space or a tab. (And commonly, all its lines begin with spaces
and/or tabs.) It should be reproduced exactly, with tabs assumed to
be on 8\-column boundaries. There are no special formatting codes,
so you can't italicize or anything like that. A \e means \e, and
nothing else.
.Sh "Command Paragraph"
.IX Subsection "Command Paragraph"
A command paragraph is used for special treatment of whole chunks
of text, usually as headings or parts of lists.
.PP
All command paragraphs (which are typically only one line long) start
with \*(L"=\*(R", followed by an identifier, followed by arbitrary text that
the command can use however it pleases. Currently recognized commands
are
.PP
.Vb 12
\& =head1 Heading Text
\& =head2 Heading Text
\& =head3 Heading Text
\& =head4 Heading Text
\& =over indentlevel
\& =item stuff
\& =back
\& =cut
\& =pod
\& =begin format
\& =end format
\& =for format text...
.Ve
.PP
To explain them each in detail:
.ie n .IP """=head1 \f(CIHeading Text\f(CW""" 4
.el .IP "\f(CW=head1 \f(CIHeading Text\f(CW\fR" 4
.IX Item "=head1 Heading Text"
.PD 0
.ie n .IP """=head2 \f(CIHeading Text\f(CW""" 4
.el .IP "\f(CW=head2 \f(CIHeading Text\f(CW\fR" 4
.IX Item "=head2 Heading Text"
.ie n .IP """=head3 \f(CIHeading Text\f(CW""" 4
.el .IP "\f(CW=head3 \f(CIHeading Text\f(CW\fR" 4
.IX Item "=head3 Heading Text"
.ie n .IP """=head4 \f(CIHeading Text\f(CW""" 4
.el .IP "\f(CW=head4 \f(CIHeading Text\f(CW\fR" 4
.IX Item "=head4 Heading Text"
.PD
Head1 through head4 produce headings, head1 being the highest
level. The text in the rest of this paragraph is the content of the
heading. For example:
.Sp
.Vb 1
\& =head2 Object Attributes
.Ve
.Sp
The text \*(L"Object Attributes\*(R" comprises the heading there. (Note that
head3 and head4 are recent additions, not supported in older Pod
translators.) The text in these heading commands can use
formatting codes, as seen here:
.Sp
.Vb 1
\& =head2 Possible Values for C<$/>
.Ve
.Sp
Such commands are explained in the
"Formatting Codes" section, below.
.ie n .IP """=over \f(CIindentlevel\f(CW""" 4
.el .IP "\f(CW=over \f(CIindentlevel\f(CW\fR" 4
.IX Item "=over indentlevel"
.PD 0
.ie n .IP """=item \f(CIstuff...\f(CW""" 4
.el .IP "\f(CW=item \f(CIstuff...\f(CW\fR" 4
.IX Item "=item stuff..."
.ie n .IP """=back""" 4
.el .IP "\f(CW=back\fR" 4
.IX Item "=back"
.PD
Item, over, and back require a little more explanation: \*(L"=over\*(R" starts
a region specifically for the generation of a list using \*(L"=item\*(R"
commands, or for indenting (groups of) normal paragraphs. At the end
of your list, use \*(L"=back\*(R" to end it. The \fIindentlevel\fR option to
\&\*(L"=over\*(R" indicates how far over to indent, generally in ems (where
one em is the width of an \*(L"M\*(R" in the document's base font) or roughly
comparable units; if there is no \fIindentlevel\fR option, it defaults
to four. (And some formatters may just ignore whatever \fIindentlevel\fR
you provide.) In the \fIstuff\fR in \f(CW\*(C`=item \f(CIstuff...\f(CW\*(C'\fR, you may
use formatting codes, as seen here:
.Sp
.Vb 1
\& =item Using C<$|> to Control Buffering
.Ve
.Sp
Such commands are explained in the
"Formatting Codes" section, below.
.Sp
Note also that there are some basic rules to using \*(L"=over\*(R" ...
\&\*(L"=back\*(R" regions:
.RS 4
.IP "\(bu" 4
Don't use \*(L"=item\*(R"s outside of an \*(L"=over\*(R" ... \*(L"=back\*(R" region.
.IP "\(bu" 4
The first thing after the \*(L"=over\*(R" command should be an \*(L"=item\*(R", unless
there aren't going to be any items at all in this \*(L"=over\*(R" ... \*(L"=back\*(R"
region.
.IP "\(bu" 4
Don't put "=head\fIn\fR\*(L" commands inside an \*(R"=over\*(L" ... \*(R"=back" region.
.IP "\(bu" 4
And perhaps most importantly, keep the items consistent: either use
\&\*(L"=item *\*(R" for all of them, to produce bullets; or use \*(L"=item 1.\*(R",
\&\*(L"=item 2.\*(R", etc., to produce numbered lists; or use \*(L"=item foo\*(R",
\&\*(L"=item bar\*(R", etc. \*(-- namely, things that look nothing like bullets or
numbers.
.Sp
If you start with bullets or numbers, stick with them, as
formatters use the first \*(L"=item\*(R" type to decide how to format the
list.
.RE
.RS 4
.RE
.ie n .IP """=cut""" 4
.el .IP "\f(CW=cut\fR" 4
.IX Item "=cut"
To end a Pod block, use a blank line,
then a line beginning with \*(L"=cut\*(R", and a blank
line after it. This lets Perl (and the Pod formatter) know that
this is where Perl code is resuming. (The blank line before the \*(L"=cut\*(R"
is not technically necessary, but many older Pod processors require it.)
.ie n .IP """=pod""" 4
.el .IP "\f(CW=pod\fR" 4
.IX Item "=pod"
The \*(L"=pod\*(R" command by itself doesn't do much of anything, but it
signals to Perl (and Pod formatters) that a Pod block starts here. A
Pod block starts with \fIany\fR command paragraph, so a \*(L"=pod\*(R" command is
usually used just when you want to start a Pod block with an ordinary
paragraph or a verbatim paragraph. For example:
.Sp
.Vb 1
\& =item stuff()
.Ve
.Sp
.Vb 1
\& This function does stuff.
.Ve
.Sp
.Vb 1
\& =cut
.Ve
.Sp
.Vb 3
\& sub stuff {
\& ...
\& }
.Ve
.Sp
.Vb 1
\& =pod
.Ve
.Sp
.Vb 1
\& Remember to check its return value, as in:
.Ve
.Sp
.Vb 1
\& stuff() || die "Couldn't do stuff!";
.Ve
.Sp
.Vb 1
\& =cut
.Ve
.ie n .IP """=begin \f(CIformatname\f(CW""" 4
.el .IP "\f(CW=begin \f(CIformatname\f(CW\fR" 4
.IX Item "=begin formatname"
.PD 0
.ie n .IP """=end \f(CIformatname\f(CW""" 4
.el .IP "\f(CW=end \f(CIformatname\f(CW\fR" 4
.IX Item "=end formatname"
.ie n .IP """=for \f(CIformatname\f(CW \f(CItext...\f(CW""" 4
.el .IP "\f(CW=for \f(CIformatname\f(CW \f(CItext...\f(CW\fR" 4
.IX Item "=for formatname text..."
.PD
For, begin, and end will let you have regions of text/code/data that
are not generally interpreted as normal Pod text, but are passed
directly to particular formatters, or are otherwise special. A
formatter that can use that format will use the region, otherwise it
will be completely ignored.
.Sp
A command "=begin \fIformatname\fR\*(L", some paragraphs, and a
command \*(R"=end \fIformatname\fR", mean that the text/data inbetween
is meant for formatters that understand the special format
called \fIformatname\fR. For example,
.Sp
.Vb 1
\& =begin html
.Ve
.Sp
.Vb 2
\&
\&
This is a raw HTML paragraph
.Ve
.Sp
.Vb 1
\& =end html
.Ve
.Sp
The command "=for \fIformatname\fR \fItext...\fR"
specifies that the remainder of just this paragraph (starting
right after \fIformatname\fR) is in that special format.
.Sp
.Vb 2
\& =for html
\&
This is a raw HTML paragraph
.Ve
.Sp
This means the same thing as the above \*(L"=begin html\*(R" ... \*(L"=end html\*(R"
region.
.Sp
That is, with \*(L"=for\*(R", you can have only one paragraph's worth
of text (i.e., the text in \*(L"=foo targetname text...\*(R"), but with
\&\*(L"=begin targetname\*(R" ... \*(L"=end targetname\*(R", you can have any amount
of stuff inbetween. (Note that there still must be a blank line
after the \*(L"=begin\*(R" command and a blank line before the \*(L"=end\*(R"
command.
.Sp
Here are some examples of how to use these:
.Sp
.Vb 1
\& =begin html
.Ve
.Sp
.Vb 1
\& Figure 1.
.Ve
.Sp
.Vb 1
\& =end html
.Ve
.Sp
.Vb 1
\& =begin text
.Ve
.Sp
.Vb 4
\& ---------------
\& | foo |
\& | bar |
\& ---------------
.Ve
.Sp
.Vb 1
\& ^^^^ Figure 1. ^^^^
.Ve
.Sp
.Vb 1
\& =end text
.Ve
.Sp
Some format names that formatters currently are known to accept
include \*(L"roff\*(R", \*(L"man\*(R", \*(L"latex\*(R", \*(L"tex\*(R", \*(L"text\*(R", and \*(L"html\*(R". (Some
formatters will treat some of these as synonyms.)
.Sp
A format name of \*(L"comment\*(R" is common for just making notes (presumably
to yourself) that won't appear in any formatted version of the Pod
document:
.Sp
.Vb 2
\& =for comment
\& Make sure that all the available options are documented!
.Ve
.Sp
Some \fIformatnames\fR will require a leading colon (as in
\&\f(CW"=for :formatname"\fR, or
\&\f(CW"=begin :formatname" ... "=end :formatname"\fR),
to signal that the text is not raw data, but instead \fIis\fR Pod text
(i.e., possibly containing formatting codes) that's just not for
normal formatting (e.g., may not be a normal-use paragraph, but might
be for formatting as a footnote).
.PP
And don't forget, when using any command, that the command lasts up
until the end of its \fIparagraph\fR, not its line. So in the
examples below, you can see that every command needs the blank
line after it, to end its paragraph.
.PP
Some examples of lists include:
.PP
.Vb 1
\& =over
.Ve
.PP
.Vb 1
\& =item *
.Ve
.PP
.Vb 1
\& First item
.Ve
.PP
.Vb 1
\& =item *
.Ve
.PP
.Vb 1
\& Second item
.Ve
.PP
.Vb 1
\& =back
.Ve
.PP
.Vb 1
\& =over
.Ve
.PP
.Vb 1
\& =item Foo()
.Ve
.PP
.Vb 1
\& Description of Foo function
.Ve
.PP
.Vb 1
\& =item Bar()
.Ve
.PP
.Vb 1
\& Description of Bar function
.Ve
.PP
.Vb 1
\& =back
.Ve
.Sh "Formatting Codes"
.IX Subsection "Formatting Codes"
In ordinary paragraphs and in some command paragraphs, various
formatting codes (a.k.a. \*(L"interior sequences\*(R") can be used:
.ie n .IP """I"" \*(-- italic text" 4
.el .IP "\f(CWI\fR \*(-- italic text" 4
.IX Item "I italic text"
Used for emphasis ("\f(CW\*(C`be I\*(C'\fR\*(L") and parameters
(\*(R"\f(CW\*(C`redo I