{
    "mode": "info",
    "parameter": "perlpod",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/perlpod/json",
    "generated": "2026-07-07T02:38:39Z",
    "sections": {
        "NAME": {
            "content": "perlpod - the Plain Old Documentation format\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Pod is a simple-to-use markup language used for writing documentation\nfor Perl, Perl programs, and Perl modules.\n\nTranslators are available for converting Pod to various formats like\nplain text, HTML, man pages, and more.\n\nPod markup consists of three basic kinds of paragraphs: ordinary,\nverbatim, and command.\n\nOrdinary Paragraph\nMost paragraphs in your documentation will be ordinary blocks of text,\nlike this one.  You can simply type in your text without any markup\nwhatsoever, and with just a blank line before and after.  When it gets\nformatted, it will undergo minimal formatting, like being rewrapped,\nprobably put into a proportionally spaced font, and maybe even\njustified.\n\nYou can use formatting codes in ordinary paragraphs, for bold, italic,\n\"code-style\", hyperlinks, and more.  Such codes are explained in the\n\"Formatting Codes\" section, below.\n\nVerbatim Paragraph\nVerbatim paragraphs are usually used for presenting a codeblock or\nother text which does not require any special parsing or formatting,\nand which shouldn't be wrapped.\n\nA verbatim paragraph is distinguished by having its first character be\na space or a tab.  (And commonly, all its lines begin with spaces\nand/or tabs.)  It should be reproduced exactly, with tabs assumed to be\non 8-column boundaries.  There are no special formatting codes, so you\ncan't italicize or anything like that.  A \\ means \\, and nothing else.\n\nCommand Paragraph\nA command paragraph is used for special treatment of whole chunks of\ntext, usually as headings or parts of lists.\n\nAll command paragraphs (which are typically only one line long) start\nwith \"=\", followed by an identifier, followed by arbitrary text that\nthe command can use however it pleases.  Currently recognized commands\nare\n\n=pod\n=head1 Heading Text\n=head2 Heading Text\n=head3 Heading Text\n=head4 Heading Text\n=over indentlevel\n=item stuff\n=back\n=begin format\n=end format\n=for format text...\n=encoding type\n=cut\n\nTo explain them each in detail:\n\n\"=head1 Heading Text\"\n\"=head2 Heading Text\"\n\"=head3 Heading Text\"\n\"=head4 Heading Text\"\nHead1 through head4 produce headings, head1 being the highest\nlevel.  The text in the rest of this paragraph is the content of\nthe heading.  For example:\n\n=head2 Object Attributes\n\nThe text \"Object Attributes\" comprises the heading there.  The text\nin these heading commands can use formatting codes, as seen here:\n\n=head2 Possible Values for C<$/>\n\nSuch commands are explained in the \"Formatting Codes\" section,\nbelow.\n\n\"=over indentlevel\"\n\"=item stuff...\"\n\"=back\"\nItem, over, and back require a little more explanation:  \"=over\"\nstarts a region specifically for the generation of a list using\n\"=item\" commands, or for indenting (groups of) normal paragraphs.\nAt the end of your list, use \"=back\" to end it.  The indentlevel\noption to \"=over\" indicates how far over to indent, generally in\nems (where one em is the width of an \"M\" in the document's base\nfont) or roughly comparable units; if there is no indentlevel\noption, it defaults to four.  (And some formatters may just ignore\nwhatever indentlevel you provide.)  In the stuff in \"=item\nstuff...\", you may use formatting codes, as seen here:\n\n=item Using C<$|> to Control Buffering\n\nSuch commands are explained in the \"Formatting Codes\" section,\nbelow.\n\nNote also that there are some basic rules to using \"=over\" ...\n\"=back\" regions:\n\no   Don't use \"=item\"s outside of an \"=over\" ... \"=back\" region.\n\no   The first thing after the \"=over\" command should be an \"=item\",\nunless there aren't going to be any items at all in this\n\"=over\" ... \"=back\" region.\n\no   Don't put \"=headn\" commands inside an \"=over\" ... \"=back\"\nregion.\n\no   And perhaps most importantly, keep the items consistent: either\nuse \"=item *\" for all of them, to produce bullets; or use\n\"=item 1.\", \"=item 2.\", etc., to produce numbered lists; or use\n\"=item foo\", \"=item bar\", etc.--namely, things that look\nnothing like bullets or numbers.  (If you have a list that\ncontains both: 1) things that don't look like bullets nor\nnumbers,  plus 2) things that do, you should preface the\nbullet- or number-like items with \"Z<>\".  See Z<> below for an\nexample.)\n\nIf you start with bullets or numbers, stick with them, as\nformatters use the first \"=item\" type to decide how to format\nthe list.\n\n\"=cut\"\nTo end a Pod block, use a blank line, then a line beginning with\n\"=cut\", and a blank line after it.  This lets Perl (and the Pod\nformatter) know that this is where Perl code is resuming.  (The\nblank line before the \"=cut\" is not technically necessary, but many\nolder Pod processors require it.)\n\n\"=pod\"\nThe \"=pod\" command by itself doesn't do much of anything, but it\nsignals to Perl (and Pod formatters) that a Pod block starts here.\nA Pod block starts with any command paragraph, so a \"=pod\" command\nis usually used just when you want to start a Pod block with an\nordinary paragraph or a verbatim paragraph.  For example:\n\n=item stuff()\n\nThis function does stuff.\n\n=cut\n\nsub stuff {\n...\n}\n\n=pod\n\nRemember to check its return value, as in:\n\nstuff() || die \"Couldn't do stuff!\";\n\n=cut\n\n\"=begin formatname\"\n\"=end formatname\"\n\"=for formatname text...\"\nFor, begin, and end will let you have regions of text/code/data\nthat are not generally interpreted as normal Pod text, but are\npassed directly to particular formatters, or are otherwise special.\nA formatter that can use that format will use the region, otherwise\nit will be completely ignored.\n\nA command \"=begin formatname\", some paragraphs, and a command \"=end\nformatname\", mean that the text/data in between is meant for\nformatters that understand the special format called formatname.\nFor example,\n\n=begin html\n\n<hr> <img src=\"thang.png\">\n<p> This is a raw HTML paragraph </p>\n\n=end html\n\nThe command \"=for formatname text...\"  specifies that the remainder\nof just this paragraph (starting right after formatname) is in that\nspecial format.\n\n=for html <hr> <img src=\"thang.png\">\n<p> This is a raw HTML paragraph </p>\n\nThis means the same thing as the above \"=begin html\" ... \"=end\nhtml\" region.\n\nThat is, with \"=for\", you can have only one paragraph's worth of\ntext (i.e., the text in \"=foo targetname text...\"), but with\n\"=begin targetname\" ... \"=end targetname\", you can have any amount\nof stuff in between.  (Note that there still must be a blank line\nafter the \"=begin\" command and a blank line before the \"=end\"\ncommand.)\n\nHere are some examples of how to use these:\n\n=begin html\n\n<br>Figure 1.<br><IMG SRC=\"figure1.png\"><br>\n\n=end html\n\n=begin text\n\n---------------\n|  foo        |\n\n^^^^ Figure 1. ^^^^\n\n=end text\n\nSome format names that formatters currently are known to accept\ninclude \"roff\", \"man\", \"latex\", \"tex\", \"text\", and \"html\".  (Some\nformatters will treat some of these as synonyms.)\n\nA format name of \"comment\" is common for just making notes\n(presumably to yourself) that won't appear in any formatted version\nof the Pod document:\n\n=for comment\nMake sure that all the available options are documented!\n\nSome formatnames will require a leading colon (as in \"=for\n:formatname\", or \"=begin :formatname\" ... \"=end :formatname\"), to\nsignal that the text is not raw data, but instead is Pod text\n(i.e., possibly containing formatting codes) that's just not for\nnormal formatting (e.g., may not be a normal-use paragraph, but\nmight be for formatting as a footnote).\n\n\"=encoding encodingname\"\nThis command is used for declaring the encoding of a document.\nMost users won't need this; but if your encoding isn't US-ASCII,\nthen put a \"=encoding encodingname\" command very early in the\ndocument so that pod formatters will know how to decode the\ndocument.  For encodingname, use a name recognized by the\nEncode::Supported module.  Some pod formatters may try to guess\nbetween a Latin-1 or CP-1252 versus UTF-8 encoding, but they may\nguess wrong.  It's best to be explicit if you use anything besides\nstrict ASCII.  Examples:\n\n=encoding latin1\n\n=encoding utf8\n\n=encoding koi8-r\n\n=encoding ShiftJIS\n\n=encoding big5\n\n\"=encoding\" affects the whole document, and must occur only once.\n\nAnd don't forget, all commands but \"=encoding\" last up until the end of\nits paragraph, not its line.  So in the examples below, you can see\nthat every command needs the blank line after it, to end its paragraph.\n(And some older Pod translators may require the \"=encoding\" line to\nhave a following blank line as well, even though it should be legal to\nomit.)\n\nSome examples of lists include:\n\n=over\n\n=item *\n\nFirst item\n\n=item *\n\nSecond item\n\n=back\n\n=over\n\n=item Foo()\n\nDescription of Foo function\n\n=item Bar()\n\nDescription of Bar function\n\n=back\n\nFormatting Codes\nIn ordinary paragraphs and in some command paragraphs, various\nformatting codes (a.k.a. \"interior sequences\") can be used:\n\n\"I<text>\" -- italic text\nUsed for emphasis (\"\"be I<careful!>\"\") and parameters (\"\"redo\nI<LABEL>\"\")\n\n\"B<text>\" -- bold text\nUsed for switches (\"\"perl's B<-n> switch\"\"), programs (\"\"some\nsystems provide a B<chfn> for that\"\"), emphasis (\"\"be\nB<careful!>\"\"), and so on (\"\"and that feature is known as\nB<autovivification>\"\").\n\n\"C<code>\" -- code text\nRenders code in a typewriter font, or gives some other indication\nthat this represents program text (\"\"C<gmtime($^T)>\"\") or some\nother form of computerese (\"\"C<drwxr-xr-x>\"\").\n\n\"L<name>\" -- a hyperlink\nThere are various syntaxes, listed below.  In the syntaxes given,\n\"text\", \"name\", and \"section\" cannot contain the characters '/' and\n'|'; and any '<' or '>' should be matched.\n\no   \"L<name>\"\n\nLink to a Perl manual page (e.g., \"L<Net::Ping>\").  Note that\n\"name\" should not contain spaces.  This syntax is also\noccasionally used for references to Unix man pages, as in\n\"L<crontab(5)>\".\n\no   \"L<name/\"sec\">\" or \"L<name/sec>\"\n\nLink to a section in other manual page.  E.g., \"L<perlsyn/\"For\nLoops\">\"\n\no   \"L</\"sec\">\" or \"L</sec>\"\n\nLink to a section in this manual page.  E.g., \"L</\"Object\nMethods\">\"\n\nA section is started by the named heading or item.  For example,\n\"L<perlvar/$.>\" or \"L<perlvar/\"$.\">\" both link to the section\nstarted by \"\"=item $.\"\" in perlvar.  And \"L<perlsyn/For Loops>\" or\n\"L<perlsyn/\"For Loops\">\" both link to the section started by\n\"\"=head2 For Loops\"\" in perlsyn.\n\nTo control what text is used for display, you use \"\"L<text|...>\"\",\nas in:\n\no   \"L<text|name>\"\n\nLink this text to that manual page.  E.g., \"L<Perl Error\nMessages|perldiag>\"\n\no   \"L<text|name/\"sec\">\" or \"L<text|name/sec>\"\n\nLink this text to that section in that manual page.  E.g.,\n\"L<postfix \"if\"|perlsyn/\"Statement Modifiers\">\"\n\no   \"L<text|/\"sec\">\" or \"L<text|/sec>\" or \"L<text|\"sec\">\"\n\nLink this text to that section in this manual page.  E.g.,\n\"L<the various attributes|/\"Member Data\">\"\n\nOr you can link to a web page:\n\no   \"L<scheme:...>\"\n\n\"L<text|scheme:...>\"\n\nLinks to an absolute URL.  For example,\n\"L<http://www.perl.org/>\" or \"L<The Perl Home\nPage|http://www.perl.org/>\".\n\n\"E<escape>\" -- a character escape\nVery similar to HTML/XML \"&foo;\" \"entity references\":\n\no   \"E<lt>\" -- a literal < (less than)\n\no   \"E<gt>\" -- a literal > (greater than)\n\no   \"E<verbar>\" -- a literal | (vertical bar)\n\no   \"E<sol>\" -- a literal / (solidus)\n\nThe above four are optional except in other formatting codes,\nnotably \"L<...>\", and when preceded by a capital letter.\n\no   \"E<htmlname>\"\n\nSome non-numeric HTML entity name, such as \"E<eacute>\", meaning\nthe same thing as \"&eacute;\" in HTML -- i.e., a lowercase e\nwith an acute (/-shaped) accent.\n\no   \"E<number>\"\n\nThe ASCII/Latin-1/Unicode character with that number.  A\nleading \"0x\" means that number is hex, as in \"E<0x201E>\".  A\nleading \"0\" means that number is octal, as in \"E<075>\".\nOtherwise number is interpreted as being in decimal, as in\n\"E<181>\".\n\nNote that older Pod formatters might not recognize octal or hex\nnumeric escapes, and that many formatters cannot reliably\nrender characters above 255.  (Some formatters may even have to\nuse compromised renderings of Latin-1/CP-1252 characters, like\nrendering \"E<eacute>\" as just a plain \"e\".)\n\n\"F<filename>\" -- used for filenames\nTypically displayed in italics.  Example: \"\"F<.cshrc>\"\"\n\n\"S<text>\" -- text contains non-breaking spaces\nThis means that the words in text should not be broken across\nlines.  Example: \"S<$x?$y:$z>\".\n\n\"X<topic name>\" -- an index entry\nThis is ignored by most formatters, but some may use it for\nbuilding indexes.  It always renders as empty-string.  Example:\n\"X<absolutizing relative URLs>\"\n\n\"Z<>\" -- a null (zero-effect) formatting code\nThis is rarely used.  It's one way to get around using an E<...>\ncode sometimes.  For example, instead of \"\"NE<lt>3\"\" (for \"N<3\")\nyou could write \"\"NZ<><3\"\" (the \"Z<>\" breaks up the \"N\" and the \"<\"\nso they can't be considered the part of a (fictitious) \"N<...>\"\ncode).\n\nAnother use is to indicate that stuff in \"=item Z<>stuff...\"  is\nnot to be considered to be a bullet or number.  For example,\nwithout the \"Z<>\", the line\n\n=item Z<>500 Server error\n\ncould possibly be parsed as an item in a numbered list when it\nisn't meant to be.\n\nStill another use is to maintain visual space between \"=item\"\nlines.  If you specify\n\n=item foo\n\n=item bar\n\nit will typically get rendered as\n\nfoo\nbar\n\nThat may be what you want, but if what you really want is\n\nfoo\n\nbar\n\nyou can use \"Z<>\" to accomplish that\n\n=item foo\n\nZ<>\n\n=item bar\n\nMost of the time, you will need only a single set of angle brackets to\ndelimit the beginning and end of formatting codes.  However, sometimes\nyou will want to put a real right angle bracket (a greater-than sign,\n'>') inside of a formatting code.  This is particularly common when\nusing a formatting code to provide a different font-type for a snippet\nof code.  As with all things in Perl, there is more than one way to do\nit.  One way is to simply escape the closing bracket using an \"E\" code:\n\nC<$a E<lt>=E<gt> $b>\n\nThis will produce: \"\"$a <=> $b\"\"\n\nA more readable, and perhaps more \"plain\" way is to use an alternate\nset of delimiters that doesn't require a single \">\" to be escaped.\nDoubled angle brackets (\"<<\" and \">>\") may be used if and only if there\nis whitespace right after the opening delimiter and whitespace right\nbefore the closing delimiter!  For example, the following will do the\ntrick:\n\nC<< $a <=> $b >>\n\nIn fact, you can use as many repeated angle-brackets as you like so\nlong as you have the same number of them in the opening and closing\ndelimiters, and make sure that whitespace immediately follows the last\n'<' of the opening delimiter, and immediately precedes the first '>' of\nthe closing delimiter.  (The whitespace is ignored.)  So the following\nwill also work:\n\nC<<< $a <=> $b >>>\nC<<<<  $a <=> $b     >>>>\n\nAnd they all mean exactly the same as this:\n\nC<$a E<lt>=E<gt> $b>\n\nThe multiple-bracket form does not affect the interpretation of the\ncontents of the formatting code, only how it must end.  That means that\nthe examples above are also exactly the same as this:\n\nC<< $a E<lt>=E<gt> $b >>\n\nAs a further example, this means that if you wanted to put these bits\nof code in \"C\" (code) style:\n\nopen(X, \">>thing.dat\") || die $!\n$foo->bar();\n\nyou could do it like so:\n\nC<<< open(X, \">>thing.dat\") || die $! >>>\nC<< $foo->bar(); >>\n\nwhich is presumably easier to read than the old way:\n\nC<open(X, \"E<gt>E<gt>thing.dat\") || die $!>\nC<$foo-E<gt>bar();>\n\nThis is currently supported by pod2text (Pod::Text), pod2man\n(Pod::Man), and any other pod2xxx or Pod::Xxxx translators that use\nPod::Parser 1.093 or later, or Pod::Tree 1.02 or later.\n\nThe Intent\nThe intent is simplicity of use, not power of expression.  Paragraphs\nlook like paragraphs (block format), so that they stand out visually,\nand so that I could run them through \"fmt\" easily to reformat them\n(that's F7 in my version of vi, or Esc Q in my version of emacs).  I\nwanted the translator to always leave the \"'\" and \"`\" and \"\"\" quotes\nalone, in verbatim mode, so I could slurp in a working program, shift\nit over four spaces, and have it print out, er, verbatim.  And\npresumably in a monospace font.\n\nThe Pod format is not necessarily sufficient for writing a book.  Pod\nis just meant to be an idiot-proof common source for nroff, HTML, TeX,\nand other markup languages, as used for online documentation.\nTranslators exist for pod2text, pod2html, pod2man (that's for nroff(1)\nand troff(1)), pod2latex, and pod2fm.  Various others are available in\nCPAN.\n\nEmbedding Pods in Perl Modules\nYou can embed Pod documentation in your Perl modules and scripts.\nStart your documentation with an empty line, a \"=head1\" command at the\nbeginning, and end it with a \"=cut\" command and an empty line.  The\nperl executable will ignore the Pod text.  You can place a Pod\nstatement where perl expects the beginning of a new statement, but not\nwithin a statement, as that would result in an error.  See any of the\nsupplied library modules for examples.\n\nIf you're going to put your Pod at the end of the file, and you're\nusing an \"END\" or \"DATA\" cut mark, make sure to put an empty\nline there before the first Pod command.\n\nEND\n\n=head1 NAME\n\nTime::Local - efficiently compute time from local and GMT time\n\nWithout that empty line before the \"=head1\", many translators wouldn't\nhave recognized the \"=head1\" as starting a Pod block.\n\nHints for Writing Pod\no\n\nThe podchecker command is provided for checking Pod syntax for\nerrors and warnings.  For example, it checks for completely blank\nlines in Pod blocks and for unknown commands and formatting codes.\nYou should still also pass your document through one or more\ntranslators and proofread the result, or print out the result and\nproofread that.  Some of the problems found may be bugs in the\ntranslators, which you may or may not wish to work around.\n\no   If you're more familiar with writing in HTML than with writing in\nPod, you can try your hand at writing documentation in simple HTML,\nand converting it to Pod with the experimental Pod::HTML2Pod\nmodule, (available in CPAN), and looking at the resulting code.\nThe experimental Pod::PXML module in CPAN might also be useful.\n\no   Many older Pod translators require the lines before every Pod\ncommand and after every Pod command (including \"=cut\"!) to be a\nblank line.  Having something like this:\n\n# - - - - - - - - - - - -\n=item $firecracker->boom()\n\nThis noisily detonates the firecracker object.\n=cut\nsub boom {\n...\n\n...will make such Pod translators completely fail to see the Pod\nblock at all.\n\nInstead, have it like this:\n\n# - - - - - - - - - - - -\n\n=item $firecracker->boom()\n\nThis noisily detonates the firecracker object.\n\n=cut\n\nsub boom {\n...\n\no   Some older Pod translators require paragraphs (including command\nparagraphs like \"=head2 Functions\") to be separated by completely\nempty lines.  If you have an apparently empty line with some spaces\non it, this might not count as a separator for those translators,\nand that could cause odd formatting.\n\no   Older translators might add wording around an L<> link, so that\n\"L<Foo::Bar>\" may become \"the Foo::Bar manpage\", for example.  So\nyou shouldn't write things like \"the L<foo> documentation\", if you\nwant the translated document to read sensibly.  Instead, write \"the\nL<Foo::Bar|Foo::Bar> documentation\" or \"L<the Foo::Bar\ndocumentation|Foo::Bar>\", to control how the link comes out.\n\no   Going past the 70th column in a verbatim block might be\nungracefully wrapped by some formatters.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "perlpodspec, \"PODs: Embedded Documentation\" in perlsyn, perlnewmod,\nperldoc, pod2html, pod2man, podchecker.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Larry Wall, Sean M. Burke\n\nperl v5.34.0                      2026-06-23                        PERLPOD(1)",
            "subsections": []
        }
    },
    "summary": "perlpod - the Plain Old Documentation format",
    "flags": [],
    "examples": [],
    "see_also": []
}