1N/A
1N/A=for comment
1N/AThis document is in Pod format. To read this, use a Pod formatter,
1N/Alike "perldoc perlpod".
1N/A
1N/A=head1 NAME
1N/A
1N/Aperlpod - the Plain Old Documentation format
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/APod is a simple-to-use markup language used for writing documentation
1N/Afor Perl, Perl programs, and Perl modules.
1N/A
1N/ATranslators are available for converting Pod to various formats
1N/Alike plain text, HTML, man pages, and more.
1N/A
1N/APod markup consists of three basic kinds of paragraphs:
1N/AL<ordinary|/"Ordinary Paragraph">,
1N/AL<verbatim|/"Verbatim Paragraph">, and
1N/AL<command|/"Command Paragraph">.
1N/A
1N/A
1N/A=head2 Ordinary Paragraph
1N/A
1N/AMost paragraphs in your documentation will be ordinary blocks
1N/Aof text, like this one. You can simply type in your text without
1N/Aany markup whatsoever, and with just a blank line before and
1N/Aafter. When it gets formatted, it will undergo minimal formatting,
1N/Alike being rewrapped, probably put into a proportionally spaced
1N/Afont, and maybe even justified.
1N/A
1N/AYou can use formatting codes in ordinary paragraphs, for B<bold>,
1N/AI<italic>, C<code-style>, L<hyperlinks|perlfaq>, and more. Such
1N/Acodes are explained in the "L<Formatting Codes|/"Formatting Codes">"
1N/Asection, below.
1N/A
1N/A
1N/A=head2 Verbatim Paragraph
1N/A
1N/AVerbatim paragraphs are usually used for presenting a codeblock or
1N/Aother text which does not require any special parsing or formatting,
1N/Aand which shouldn't be wrapped.
1N/A
1N/AA verbatim paragraph is distinguished by having its first character
1N/Abe a space or a tab. (And commonly, all its lines begin with spaces
1N/Aand/or tabs.) It should be reproduced exactly, with tabs assumed to
1N/Abe on 8-column boundaries. There are no special formatting codes,
1N/Aso you can't italicize or anything like that. A \ means \, and
1N/Anothing else.
1N/A
1N/A
1N/A=head2 Command Paragraph
1N/A
1N/AA command paragraph is used for special treatment of whole chunks
1N/Aof text, usually as headings or parts of lists.
1N/A
1N/AAll command paragraphs (which are typically only one line long) start
1N/Awith "=", followed by an identifier, followed by arbitrary text that
1N/Athe command can use however it pleases. Currently recognized commands
1N/Aare
1N/A
1N/A =head1 Heading Text
1N/A =head2 Heading Text
1N/A =head3 Heading Text
1N/A =head4 Heading Text
1N/A =over indentlevel
1N/A =item stuff
1N/A =back
1N/A =cut
1N/A =pod
1N/A =begin format
1N/A =end format
1N/A =for format text...
1N/A
1N/ATo explain them each in detail:
1N/A
1N/A=over
1N/A
1N/A=item C<=head1 I<Heading Text>>
1N/A
1N/A=item C<=head2 I<Heading Text>>
1N/A
1N/A=item C<=head3 I<Heading Text>>
1N/A
1N/A=item C<=head4 I<Heading Text>>
1N/A
1N/AHead1 through head4 produce headings, head1 being the highest
1N/Alevel. The text in the rest of this paragraph is the content of the
1N/Aheading. For example:
1N/A
1N/A =head2 Object Attributes
1N/A
1N/AThe text "Object Attributes" comprises the heading there. (Note that
1N/Ahead3 and head4 are recent additions, not supported in older Pod
1N/Atranslators.) The text in these heading commands can use
1N/Aformatting codes, as seen here:
1N/A
1N/A =head2 Possible Values for C<$/>
1N/A
1N/ASuch commands are explained in the
1N/A"L<Formatting Codes|/"Formatting Codes">" section, below.
1N/A
1N/A=item C<=over I<indentlevel>>
1N/A
1N/A=item C<=item I<stuff...>>
1N/A
1N/A=item C<=back>
1N/A
1N/AItem, over, and back require a little more explanation: "=over" starts
1N/Aa region specifically for the generation of a list using "=item"
1N/Acommands, or for indenting (groups of) normal paragraphs. At the end
1N/Aof your list, use "=back" to end it. The I<indentlevel> option to
1N/A"=over" indicates how far over to indent, generally in ems (where
1N/Aone em is the width of an "M" in the document's base font) or roughly
1N/Acomparable units; if there is no I<indentlevel> option, it defaults
1N/Ato four. (And some formatters may just ignore whatever I<indentlevel>
1N/Ayou provide.) In the I<stuff> in C<=item I<stuff...>>, you may
1N/Ause formatting codes, as seen here:
1N/A
1N/A =item Using C<$|> to Control Buffering
1N/A
1N/ASuch commands are explained in the
1N/A"L<Formatting Codes|/"Formatting Codes">" section, below.
1N/A
1N/ANote also that there are some basic rules to using "=over" ...
1N/A"=back" regions:
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/ADon't use "=item"s outside of an "=over" ... "=back" region.
1N/A
1N/A=item *
1N/A
1N/AThe first thing after the "=over" command should be an "=item", unless
1N/Athere aren't going to be any items at all in this "=over" ... "=back"
1N/Aregion.
1N/A
1N/A=item *
1N/A
1N/ADon't put "=headI<n>" commands inside an "=over" ... "=back" region.
1N/A
1N/A=item *
1N/A
1N/AAnd perhaps most importantly, keep the items consistent: either use
1N/A"=item *" for all of them, to produce bullets; or use "=item 1.",
1N/A"=item 2.", etc., to produce numbered lists; or use "=item foo",
1N/A"=item bar", etc. -- namely, things that look nothing like bullets or
1N/Anumbers.
1N/A
1N/AIf you start with bullets or numbers, stick with them, as
1N/Aformatters use the first "=item" type to decide how to format the
1N/Alist.
1N/A
1N/A=back
1N/A
1N/A=item C<=cut>
1N/A
1N/ATo end a Pod block, use a blank line,
1N/Athen a line beginning with "=cut", and a blank
1N/Aline after it. This lets Perl (and the Pod formatter) know that
1N/Athis is where Perl code is resuming. (The blank line before the "=cut"
1N/Ais not technically necessary, but many older Pod processors require it.)
1N/A
1N/A=item C<=pod>
1N/A
1N/AThe "=pod" command by itself doesn't do much of anything, but it
1N/Asignals to Perl (and Pod formatters) that a Pod block starts here. A
1N/APod block starts with I<any> command paragraph, so a "=pod" command is
1N/Ausually used just when you want to start a Pod block with an ordinary
1N/Aparagraph or a verbatim paragraph. For example:
1N/A
1N/A =item stuff()
1N/A
1N/A This function does stuff.
1N/A
1N/A =cut
1N/A
1N/A sub stuff {
1N/A ...
1N/A }
1N/A
1N/A =pod
1N/A
1N/A Remember to check its return value, as in:
1N/A
1N/A stuff() || die "Couldn't do stuff!";
1N/A
1N/A =cut
1N/A
1N/A=item C<=begin I<formatname>>
1N/A
1N/A=item C<=end I<formatname>>
1N/A
1N/A=item C<=for I<formatname> I<text...>>
1N/A
1N/AFor, begin, and end will let you have regions of text/code/data that
1N/Aare not generally interpreted as normal Pod text, but are passed
1N/Adirectly to particular formatters, or are otherwise special. A
1N/Aformatter that can use that format will use the region, otherwise it
1N/Awill be completely ignored.
1N/A
1N/AA command "=begin I<formatname>", some paragraphs, and a
1N/Acommand "=end I<formatname>", mean that the text/data inbetween
1N/Ais meant for formatters that understand the special format
1N/Acalled I<formatname>. For example,
1N/A
1N/A =begin html
1N/A
1N/A <hr> <img src="thang.png">
1N/A <p> This is a raw HTML paragraph </p>
1N/A
1N/A =end html
1N/A
1N/AThe command "=for I<formatname> I<text...>"
1N/Aspecifies that the remainder of just this paragraph (starting
1N/Aright after I<formatname>) is in that special format.
1N/A
1N/A =for html <hr> <img src="thang.png">
1N/A <p> This is a raw HTML paragraph </p>
1N/A
1N/AThis means the same thing as the above "=begin html" ... "=end html"
1N/Aregion.
1N/A
1N/AThat is, with "=for", you can have only one paragraph's worth
1N/Aof text (i.e., the text in "=foo targetname text..."), but with
1N/A"=begin targetname" ... "=end targetname", you can have any amount
1N/Aof stuff inbetween. (Note that there still must be a blank line
1N/Aafter the "=begin" command and a blank line before the "=end"
1N/Acommand.
1N/A
1N/AHere are some examples of how to use these:
1N/A
1N/A =begin html
1N/A
1N/A <br>Figure 1.<br><IMG SRC="figure1.png"><br>
1N/A
1N/A =end html
1N/A
1N/A =begin text
1N/A
1N/A ---------------
1N/A | foo |
1N/A | bar |
1N/A ---------------
1N/A
1N/A ^^^^ Figure 1. ^^^^
1N/A
1N/A =end text
1N/A
1N/ASome format names that formatters currently are known to accept
1N/Ainclude "roff", "man", "latex", "tex", "text", and "html". (Some
1N/Aformatters will treat some of these as synonyms.)
1N/A
1N/AA format name of "comment" is common for just making notes (presumably
1N/Ato yourself) that won't appear in any formatted version of the Pod
1N/Adocument:
1N/A
1N/A =for comment
1N/A Make sure that all the available options are documented!
1N/A
1N/ASome I<formatnames> will require a leading colon (as in
1N/AC<"=for :formatname">, or
1N/AC<"=begin :formatname" ... "=end :formatname">),
1N/Ato signal that the text is not raw data, but instead I<is> Pod text
1N/A(i.e., possibly containing formatting codes) that's just not for
1N/Anormal formatting (e.g., may not be a normal-use paragraph, but might
1N/Abe for formatting as a footnote).
1N/A
1N/A=item C<=encoding I<encodingname>>
1N/A
1N/AThis command is used for declaring the encoding of a document. Most
1N/Ausers won't need this; but if your encoding isn't US-ASCII or Latin-1,
1N/Athen put a C<=encoding I<encodingname>> command early in the document so
1N/Athat pod formatters will know how to decode the document. For
1N/AI<encodingname>, use a name recognized by the L<Encode::Supported>
1N/Amodule. Examples:
1N/A
1N/A =encoding utf8
1N/A
1N/A =encoding koi8-r
1N/A
1N/A =encoding ShiftJIS
1N/A
1N/A =encoding big5
1N/A
1N/A=back
1N/A
1N/AAnd don't forget, when using any command, that the command lasts up
1N/Auntil the end of its I<paragraph>, not its line. So in the
1N/Aexamples below, you can see that every command needs the blank
1N/Aline after it, to end its paragraph.
1N/A
1N/ASome examples of lists include:
1N/A
1N/A =over
1N/A
1N/A =item *
1N/A
1N/A First item
1N/A
1N/A =item *
1N/A
1N/A Second item
1N/A
1N/A =back
1N/A
1N/A =over
1N/A
1N/A =item Foo()
1N/A
1N/A Description of Foo function
1N/A
1N/A =item Bar()
1N/A
1N/A Description of Bar function
1N/A
1N/A =back
1N/A
1N/A
1N/A=head2 Formatting Codes
1N/A
1N/AIn ordinary paragraphs and in some command paragraphs, various
1N/Aformatting codes (a.k.a. "interior sequences") can be used:
1N/A
1N/A=for comment
1N/A "interior sequences" is such an opaque term.
1N/A Prefer "formatting codes" instead.
1N/A
1N/A=over
1N/A
1N/A=item C<IE<lt>textE<gt>> -- italic text
1N/A
1N/AUsed for emphasis ("C<be IE<lt>careful!E<gt>>") and parameters
1N/A("C<redo IE<lt>LABELE<gt>>")
1N/A
1N/A=item C<BE<lt>textE<gt>> -- bold text
1N/A
1N/AUsed for switches ("C<perl's BE<lt>-nE<gt> switch>"), programs
1N/A("C<some systems provide a BE<lt>chfnE<gt> for that>"),
1N/Aemphasis ("C<be BE<lt>careful!E<gt>>"), and so on
1N/A("C<and that feature is known as BE<lt>autovivificationE<gt>>").
1N/A
1N/A=item C<CE<lt>codeE<gt>> -- code text
1N/A
1N/ARenders code in a typewriter font, or gives some other indication that
1N/Athis represents program text ("C<CE<lt>gmtime($^T)E<gt>>") or some other
1N/Aform of computerese ("C<CE<lt>drwxr-xr-xE<gt>>").
1N/A
1N/A=item C<LE<lt>nameE<gt>> -- a hyperlink
1N/A
1N/AThere are various syntaxes, listed below. In the syntaxes given,
1N/AC<text>, C<name>, and C<section> cannot contain the characters
1N/A'/' and '|'; and any '<' or '>' should be matched.
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>nameE<gt>>
1N/A
1N/ALink to a Perl manual page (e.g., C<LE<lt>Net::PingE<gt>>). Note
1N/Athat C<name> should not contain spaces. This syntax
1N/Ais also occasionally used for references to UNIX man pages, as in
1N/AC<LE<lt>crontab(5)E<gt>>.
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>name/"sec"E<gt>> or C<LE<lt>name/secE<gt>>
1N/A
1N/ALink to a section in other manual page. E.g.,
1N/AC<LE<lt>perlsyn/"For Loops"E<gt>>
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>/"sec"E<gt>> or C<LE<lt>/secE<gt>> or C<LE<lt>"sec"E<gt>>
1N/A
1N/ALink to a section in this manual page. E.g.,
1N/AC<LE<lt>/"Object Methods"E<gt>>
1N/A
1N/A=back
1N/A
1N/AA section is started by the named heading or item. For
1N/Aexample, C<LE<lt>perlvar/$.E<gt>> or C<LE<lt>perlvar/"$."E<gt>> both
1N/Alink to the section started by "C<=item $.>" in perlvar. And
1N/AC<LE<lt>perlsyn/For LoopsE<gt>> or C<LE<lt>perlsyn/"For Loops"E<gt>>
1N/Aboth link to the section started by "C<=head2 For Loops>"
1N/Ain perlsyn.
1N/A
1N/ATo control what text is used for display, you
1N/Ause "C<LE<lt>text|...E<gt>>", as in:
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>text|nameE<gt>>
1N/A
1N/ALink this text to that manual page. E.g.,
1N/AC<LE<lt>Perl Error Messages|perldiagE<gt>>
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>text|name/"sec"E<gt>> or C<LE<lt>text|name/secE<gt>>
1N/A
1N/ALink this text to that section in that manual page. E.g.,
1N/AC<LE<lt>SWITCH statements|perlsyn/"Basic BLOCKs and Switch
1N/AStatements"E<gt>>
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>text|/"sec"E<gt>> or C<LE<lt>text|/secE<gt>>
1N/Aor C<LE<lt>text|"sec"E<gt>>
1N/A
1N/ALink this text to that section in this manual page. E.g.,
1N/AC<LE<lt>the various attributes|/"Member Data"E<gt>>
1N/A
1N/A=back
1N/A
1N/AOr you can link to a web page:
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AC<LE<lt>scheme:...E<gt>>
1N/A
1N/ALinks to an absolute URL. For example,
1N/AC<LE<lt>http://www.perl.org/E<gt>>. But note
1N/Athat there is no corresponding C<LE<lt>text|scheme:...E<gt>> syntax, for
1N/Avarious reasons.
1N/A
1N/A=back
1N/A
1N/A=item C<EE<lt>escapeE<gt>> -- a character escape
1N/A
1N/AVery similar to HTML/XML C<&I<foo>;> "entity references":
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>ltE<gt>> -- a literal E<lt> (less than)
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>gtE<gt>> -- a literal E<gt> (greater than)
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>verbarE<gt>> -- a literal | (I<ver>tical I<bar>)
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>solE<gt>> = a literal / (I<sol>idus)
1N/A
1N/AThe above four are optional except in other formatting codes,
1N/Anotably C<LE<lt>...E<gt>>, and when preceded by a
1N/Acapital letter.
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>htmlnameE<gt>>
1N/A
1N/ASome non-numeric HTML entity name, such as C<EE<lt>eacuteE<gt>>,
1N/Ameaning the same thing as C<&eacute;> in HTML -- i.e., a lowercase
1N/Ae with an acute (/-shaped) accent.
1N/A
1N/A=item *
1N/A
1N/AC<EE<lt>numberE<gt>>
1N/A
1N/AThe ASCII/Latin-1/Unicode character with that number. A
1N/Aleading "0x" means that I<number> is hex, as in
1N/AC<EE<lt>0x201EE<gt>>. A leading "0" means that I<number> is octal,
1N/Aas in C<EE<lt>075E<gt>>. Otherwise I<number> is interpreted as being
1N/Ain decimal, as in C<EE<lt>181E<gt>>.
1N/A
1N/ANote that older Pod formatters might not recognize octal or
1N/Ahex numeric escapes, and that many formatters cannot reliably
1N/Arender characters above 255. (Some formatters may even have
1N/Ato use compromised renderings of Latin-1 characters, like
1N/Arendering C<EE<lt>eacuteE<gt>> as just a plain "e".)
1N/A
1N/A=back
1N/A
1N/A=item C<FE<lt>filenameE<gt>> -- used for filenames
1N/A
1N/ATypically displayed in italics. Example: "C<FE<lt>.cshrcE<gt>>"
1N/A
1N/A=item C<SE<lt>textE<gt>> -- text contains non-breaking spaces
1N/A
1N/AThis means that the words in I<text> should not be broken
1N/Aacross lines. Example: S<C<SE<lt>$x ? $y : $zE<gt>>>.
1N/A
1N/A=item C<XE<lt>topic nameE<gt>> -- an index entry
1N/A
1N/AThis is ignored by most formatters, but some may use it for building
1N/Aindexes. It always renders as empty-string.
1N/AExample: C<XE<lt>absolutizing relative URLsE<gt>>
1N/A
1N/A=item C<ZE<lt>E<gt>> -- a null (zero-effect) formatting code
1N/A
1N/AThis is rarely used. It's one way to get around using an
1N/AEE<lt>...E<gt> code sometimes. For example, instead of
1N/A"C<NEE<lt>ltE<gt>3>" (for "NE<lt>3") you could write
1N/A"C<NZE<lt>E<gt>E<lt>3>" (the "ZE<lt>E<gt>" breaks up the "N" and
1N/Athe "E<lt>" so they can't be considered
1N/Athe part of a (fictitious) "NE<lt>...E<gt>" code.
1N/A
1N/A=for comment
1N/A This was formerly explained as a "zero-width character". But it in
1N/A most parser models, it parses to nothing at all, as opposed to parsing
1N/A as if it were a E<zwnj> or E<zwj>, which are REAL zero-width characters.
1N/A So "width" and "character" are exactly the wrong words.
1N/A
1N/A=back
1N/A
1N/AMost of the time, you will need only a single set of angle brackets to
1N/Adelimit the beginning and end of formatting codes. However,
1N/Asometimes you will want to put a real right angle bracket (a
1N/Agreater-than sign, '>') inside of a formatting code. This is particularly
1N/Acommon when using a formatting code to provide a different font-type for a
1N/Asnippet of code. As with all things in Perl, there is more than
1N/Aone way to do it. One way is to simply escape the closing bracket
1N/Ausing an C<E> code:
1N/A
1N/A C<$a E<lt>=E<gt> $b>
1N/A
1N/AThis will produce: "C<$a E<lt>=E<gt> $b>"
1N/A
1N/AA more readable, and perhaps more "plain" way is to use an alternate
1N/Aset of delimiters that doesn't require a single ">" to be escaped. With
1N/Athe Pod formatters that are standard starting with perl5.5.660, doubled
1N/Aangle brackets ("<<" and ">>") may be used I<if and only if there is
1N/Awhitespace right after the opening delimiter and whitespace right
1N/Abefore the closing delimiter!> For example, the following will
1N/Ado the trick:
1N/A
1N/A C<< $a <=> $b >>
1N/A
1N/AIn fact, you can use as many repeated angle-brackets as you like so
1N/Along as you have the same number of them in the opening and closing
1N/Adelimiters, and make sure that whitespace immediately follows the last
1N/A'<' of the opening delimiter, and immediately precedes the first '>'
1N/Aof the closing delimiter. (The whitespace is ignored.) So the
1N/Afollowing will also work:
1N/A
1N/A C<<< $a <=> $b >>>
1N/A C<<<< $a <=> $b >>>>
1N/A
1N/AAnd they all mean exactly the same as this:
1N/A
1N/A C<$a E<lt>=E<gt> $b>
1N/A
1N/AAs a further example, this means that if you wanted to put these bits of
1N/Acode in C<C> (code) style:
1N/A
1N/A open(X, ">>thing.dat") || die $!
1N/A $foo->bar();
1N/A
1N/Ayou could do it like so:
1N/A
1N/A C<<< open(X, ">>thing.dat") || die $! >>>
1N/A C<< $foo->bar(); >>
1N/A
1N/Awhich is presumably easier to read than the old way:
1N/A
1N/A C<open(X, "E<gt>E<gt>thing.dat") || die $!>
1N/A C<$foo-E<gt>bar();>
1N/A
1N/AThis is currently supported by pod2text (Pod::Text), pod2man (Pod::Man),
1N/Aand any other pod2xxx or Pod::Xxxx translators that use
1N/APod::Parser 1.093 or later, or Pod::Tree 1.02 or later.
1N/A
1N/A=head2 The Intent
1N/A
1N/AThe intent is simplicity of use, not power of expression. Paragraphs
1N/Alook like paragraphs (block format), so that they stand out
1N/Avisually, and so that I could run them through C<fmt> easily to reformat
1N/Athem (that's F7 in my version of B<vi>, or Esc Q in my version of
1N/AB<emacs>). I wanted the translator to always leave the C<'> and C<`> and
1N/AC<"> quotes alone, in verbatim mode, so I could slurp in a
1N/Aworking program, shift it over four spaces, and have it print out, er,
1N/Averbatim. And presumably in a monospace font.
1N/A
1N/AThe Pod format is not necessarily sufficient for writing a book. Pod
1N/Ais just meant to be an idiot-proof common source for nroff, HTML,
1N/ATeX, and other markup languages, as used for online
1N/Adocumentation. Translators exist for B<pod2text>, B<pod2html>,
1N/AB<pod2man> (that's for nroff(1) and troff(1)), B<pod2latex>, and
1N/AB<pod2fm>. Various others are available in CPAN.
1N/A
1N/A
1N/A=head2 Embedding Pods in Perl Modules
1N/A
1N/AYou can embed Pod documentation in your Perl modules and scripts.
1N/AStart your documentation with an empty line, a "=head1" command at the
1N/Abeginning, and end it with a "=cut" command and an empty line. Perl
1N/Awill ignore the Pod text. See any of the supplied library modules for
1N/Aexamples. If you're going to put your Pod at the end of the file, and
1N/Ayou're using an __END__ or __DATA__ cut mark, make sure to put an
1N/Aempty line there before the first Pod command.
1N/A
1N/A __END__
1N/A
1N/A =head1 NAME
1N/A
1N/A Time::Local - efficiently compute time from local and GMT time
1N/A
1N/AWithout that empty line before the "=head1", many translators wouldn't
1N/Ahave recognized the "=head1" as starting a Pod block.
1N/A
1N/A=head2 Hints for Writing Pod
1N/A
1N/A=over
1N/A
1N/A=item *
1N/A
1N/AThe B<podchecker> command is provided for checking Pod syntax for errors
1N/Aand warnings. For example, it checks for completely blank lines in
1N/APod blocks and for unknown commands and formatting codes. You should
1N/Astill also pass your document through one or more translators and proofread
1N/Athe result, or print out the result and proofread that. Some of the
1N/Aproblems found may be bugs in the translators, which you may or may not
1N/Awish to work around.
1N/A
1N/A=item *
1N/A
1N/AIf you're more familiar with writing in HTML than with writing in Pod, you
1N/Acan try your hand at writing documentation in simple HTML, and converting
1N/Ait to Pod with the experimental L<Pod::HTML2Pod|Pod::HTML2Pod> module,
1N/A(available in CPAN), and looking at the resulting code. The experimental
1N/AL<Pod::PXML|Pod::PXML> module in CPAN might also be useful.
1N/A
1N/A=item *
1N/A
1N/AMany older Pod translators require the lines before every Pod
1N/Acommand and after every Pod command (including "=cut"!) to be a blank
1N/Aline. Having something like this:
1N/A
1N/A # - - - - - - - - - - - -
1N/A =item $firecracker->boom()
1N/A
1N/A This noisily detonates the firecracker object.
1N/A =cut
1N/A sub boom {
1N/A ...
1N/A
1N/A...will make such Pod translators completely fail to see the Pod block
1N/Aat all.
1N/A
1N/AInstead, have it like this:
1N/A
1N/A # - - - - - - - - - - - -
1N/A
1N/A =item $firecracker->boom()
1N/A
1N/A This noisily detonates the firecracker object.
1N/A
1N/A =cut
1N/A
1N/A sub boom {
1N/A ...
1N/A
1N/A=item *
1N/A
1N/ASome older Pod translators require paragraphs (including command
1N/Aparagraphs like "=head2 Functions") to be separated by I<completely>
1N/Aempty lines. If you have an apparently empty line with some spaces
1N/Aon it, this might not count as a separator for those translators, and
1N/Athat could cause odd formatting.
1N/A
1N/A=item *
1N/A
1N/AOlder translators might add wording around an LE<lt>E<gt> link, so that
1N/AC<LE<lt>Foo::BarE<gt>> may become "the Foo::Bar manpage", for example.
1N/ASo you shouldn't write things like C<the LE<lt>fooE<gt>
1N/Adocumentation>, if you want the translated document to read sensibly
1N/A-- instead write C<the LE<lt>Foo::Bar|Foo::BarE<gt> documentation> or
1N/AC<LE<lt>the Foo::Bar documentation|Foo::BarE<gt>>, to control how the
1N/Alink comes out.
1N/A
1N/A=item *
1N/A
1N/AGoing past the 70th column in a verbatim block might be ungracefully
1N/Awrapped by some formatters.
1N/A
1N/A=back
1N/A
1N/A=head1 SEE ALSO
1N/A
1N/AL<perlpodspec>, L<perlsyn/"PODs: Embedded Documentation">,
1N/AL<perlnewmod>, L<perldoc>, L<pod2html>, L<pod2man>, L<podchecker>.
1N/A
1N/A=head1 AUTHOR
1N/A
1N/ALarry Wall, Sean M. Burke
1N/A
1N/A=cut