{
    "mode": "perldoc",
    "parameter": "Pod::Checker",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Pod%3A%3AChecker/json",
    "generated": "2026-05-30T06:08:08Z",
    "synopsis": "use Pod::Checker;\n$syntaxokay = podchecker($filepath, $outputpath, %options);\nmy $checker = Pod::Checker->new(%options);\n$checker->parsefromfile($filepath, \\*STDERR);",
    "sections": {
        "NAME": {
            "content": "Pod::Checker - check pod documents for syntax errors\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Pod::Checker;\n\n$syntaxokay = podchecker($filepath, $outputpath, %options);\n\nmy $checker = Pod::Checker->new(%options);\n$checker->parsefromfile($filepath, \\*STDERR);\n",
            "subsections": []
        },
        "OPTIONS/ARGUMENTS": {
            "content": "$filepath is the input POD to read and $outputpath is where to write POD\nsyntax error messages. Either argument may be a scalar indicating a\nfile-path, or else a reference to an open filehandle. If unspecified,\nthe input-file it defaults to \"\\*STDIN\", and the output-file defaults to\n\"\\*STDERR\".\n\npodchecker()\nThis function can take a hash of options:\n\n-warnings => *val*\nTurn warnings on/off. *val* is usually 1 for on, but higher values\ntrigger additional warnings. See \"Warnings\".\n\n-quiet => *val*\nIf \"val\" is true, do not print any errors/warnings.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "podchecker will perform syntax checking of Perl5 POD format\ndocumentation.\n\nCurious/ambitious users are welcome to propose additional features they\nwish to see in Pod::Checker and podchecker and verify that the checks\nare consistent with perlpod.\n\nThe following checks are currently performed:\n\n*   Unknown '=xxxx' commands, unknown 'X<...>' interior-sequences, and\nunterminated interior sequences.\n\n*   Check for proper balancing of \"=begin\" and \"=end\". The contents of\nsuch a block are generally ignored, i.e. no syntax checks are\nperformed.\n\n*   Check for proper nesting and balancing of \"=over\", \"=item\" and\n\"=back\".\n\n*   Check for same nested interior-sequences (e.g. \"L<...L<...>...>\").\n\n*   Check for malformed or non-existing entities \"E<...>\".\n\n*   Check for correct syntax of hyperlinks \"L<...>\". See perlpod for\ndetails.\n\n*   Check for unresolved document-internal links. This check may also\nreveal misspelled links that seem to be internal links but should be\nlinks to something else.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "",
            "subsections": [
                {
                    "name": "Errors",
                    "content": "*   empty =headn\n\nA heading (\"=head1\" or \"=head2\") without any text? That ain't no\nheading!\n\n*   =over on line *N* without closing =back\n\n*   You forgot a '=back' before '=head*N*'\n\n*   =over is the last thing in the document?!\n\nThe \"=over\" command does not have a corresponding \"=back\" before the\nnext heading (\"=head1\" or \"=head2\") or the end of the file.\n\n*   '=item' outside of any '=over'\n\n*   =back without =over\n\nAn \"=item\" or \"=back\" command has been found outside a\n\"=over\"/\"=back\" block.\n\n*   Can't have a 0 in =over *N*\n\nYou need to indent a strictly positive number of spaces, not 0.\n\n*   =over should be: '=over' or '=over positivenumber'\n\nEither have an argumentless =over, or have its argument a strictly\npositive number.\n\n*   =begin *TARGET* without matching =end *TARGET*\n\nA \"=begin\" command was found that has no matching =end command.\n\n*   =begin without a target?\n\nA \"=begin\" command was found that is not followed by the formatter\nspecification.\n\n*   =end *TARGET* without matching =begin.\n\nA standalone \"=end\" command was found.\n\n*   '=end' without a target?\n\n'=end' directives need to have a target, just like =begin\ndirectives.\n\n*   '=end *TARGET*' is invalid.\n\n*TARGET* needs to be one word\n\n*   =end *CONTENT* doesn't match =begin *TARGET*\n\n*CONTENT* needs to match =begin's *TARGET*.\n\n*   =for without a target?\n\nThere is no specification of the formatter after the \"=for\" command.\n\n*   unresolved internal link *NAME*\n\nThe given link to *NAME* does not have a matching node in the\ncurrent POD. This also happened when a single word node name is not\nenclosed in \"\".\n\n*   Unknown directive: *CMD*\n\nAn invalid POD command has been found. Valid are \"=head1\", \"=head2\",\n\"=head3\", \"=head4\", \"=over\", \"=item\", \"=back\", \"=begin\", \"=end\",\n\"=for\", \"=pod\", \"=cut\"\n\n*   Deleting unknown formatting code *SEQ*\n\nAn invalid markup command has been encountered. Valid are: \"B<>\",\n\"C<>\", \"E<>\", \"F<>\", \"I<>\", \"L<>\", \"S<>\", \"X<>\", \"Z<>\"\n\n*   Unterminated *SEQ*<> sequence\n\nAn unclosed formatting code\n\n*   An E<...> surrounding strange content\n\nThe *STRING* found cannot be interpreted as a character entity.\n\n*   An empty E<>\n\n*   An empty \"L<>\"\n\n*   An empty X<>\n\nThere needs to be content inside E, L, and X formatting codes.\n\n*   Spurious text after =pod / =cut\n\nThe commands \"=pod\" and \"=cut\" do not take any arguments.\n\n*   =back doesn't take any parameters, but you said =back *ARGUMENT*\n\nThe \"=back\" command does not take any arguments.\n\n*   =pod directives shouldn't be over one line long! Ignoring all *N*\nlines of content\n\nSelf explanatory\n\n*   =cut found outside a pod block.\n\nA '=cut' directive found in the middle of non-POD\n\n*   Invalid =encoding syntax: *CONTENT*\n\nSyntax error in =encoding directive\n"
                },
                {
                    "name": "Warnings",
                    "content": "These may not necessarily cause trouble, but indicate mediocre style.\n\n*   nested commands *CMD*<...*CMD*<...>...>\n\nTwo nested identical markup commands have been found. Generally this\ndoes not make sense.\n\n*   multiple occurrences (*N*) of link target *name*\n\nThe POD file has some \"=item\" and/or \"=head\" commands that have the\nsame text. Potential hyperlinks to such a text cannot be unique\nthen. This warning is printed only with warning level greater than\none.\n\n*   line containing nothing but whitespace in paragraph\n\nThere is some whitespace on a seemingly empty line. POD is very\nsensitive to such things, so this is flagged. vi users switch on the\nlist option to avoid this problem.\n\n*   =item has no contents\n\nThere is a list \"=item\" that has no text contents. You probably want\nto delete empty items.\n\n*   You can't have =items (as at line *N*) unless the first thing after\nthe =over is an =item\n\nA list introduced by \"=over\" starts with a text or verbatim\nparagraph, but continues with \"=item\"s. Move the non-item paragraph\nout of the \"=over\"/\"=back\" block.\n\n*   Expected '=item *EXPECTED VALUE*'\n\n*   Expected '=item *'\n\n*   Possible =item type mismatch: '*x*' found leading a supposed\ndefinition =item\n\nA list started with e.g. a bullet-like \"=item\" and continued with a\nnumbered one. This is obviously inconsistent. For most translators\nthe type of the *first* \"=item\" determines the type of the list.\n\n*   You have '=item x' instead of the expected '=item *N*'\n\nErroneous numbering of =item numbers; they need to ascend\nconsecutively.\n\n*   Unknown E content in E<*CONTENT*>\n\nA character entity was found that does not belong to the standard\nISO set or the POD specials \"verbar\" and \"sol\". *Currently, this\nwarning only appears if a character entity was found that does not\nhave a Unicode character. This should be fixed to adhere to the\noriginal warning.*\n\n*   empty =over/=back block\n\nThe list opened with \"=over\" does not contain anything.\n\n*   empty section in previous paragraph\n\nThe previous section (introduced by a \"=head\" command) does not\ncontain any valid content. This usually indicates that something is\nmissing. Note: A \"=head1\" followed immediately by \"=head2\" does not\ntrigger this warning.\n\n*   Verbatim paragraph in NAME section\n\nThe NAME section (\"=head1 NAME\") should consist of a single\nparagraph with the script/module name, followed by a dash `-' and a\nvery short description of what the thing is good for.\n\n*   =head*n* without preceding higher level\n\nFor example if there is a \"=head2\" in the POD file prior to a\n\"=head1\".\n\n*   A non-empty Z<>\n\nThe \"Z<>\" sequence is supposed to be empty. Caveat: this issue is\ndetected in Pod::Simple and will be flagged as an *ERROR* by any\nclient code; any contents of \"Z<...>\" will be disregarded, anyway.\n"
                },
                {
                    "name": "Hyperlinks",
                    "content": "There are some warnings with respect to malformed hyperlinks:\n\n*   ignoring leading/trailing whitespace in link\n\nThere is whitespace at the beginning or the end of the contents of\nL<...>.\n\n*   alternative text/node '%s' contains non-escaped | or /\n\nThe characters \"|\" and \"/\" are special in the L<...> context.\nAlthough the hyperlink parser does its best to determine which \"/\"\nis text and which is a delimiter in case of doubt, one ought to\nescape these literal characters like this:\n\n/     E<sol>\n|     E<verbar>\n\nNote that the line number of the error/warning may refer to the line\nnumber of the start of the paragraph in which the error/warning exists,\nnot the line number that the error/warning is on. This bug is present in\nerrors/warnings related to formatting codes. *This should be fixed.*\n"
                }
            ]
        },
        "RETURN VALUE": {
            "content": "podchecker returns the number of POD syntax errors found or -1 if there\nwere no POD commands at all found in the file.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "See \"SYNOPSIS\"\n",
            "subsections": []
        },
        "SCRIPTS": {
            "content": "The podchecker script that comes with this distribution is a lean\nwrapper around this module. See the online manual with\n\npodchecker -help\npodchecker -man\n",
            "subsections": []
        },
        "INTERFACE": {
            "content": "While checking, this module collects document properties, e.g. the nodes\nfor hyperlinks (\"=headX\", \"=item\") and index entries (\"X<>\"). POD\ntranslators can use this feature to syntax-check and get the nodes in a\nfirst pass before actually starting to convert. This is expensive in\nterms of execution time, but allows for very robust conversions.\n\nSince v1.24 the Pod::Checker module uses only the poderror method to\nprint errors and warnings. The summary output (e.g. \"Pod syntax OK\") has\nbeen dropped from the module and has been included in podchecker (the\nscript). This allows users of Pod::Checker to control completely the\noutput behavior. Users of podchecker (the script) get the well-known\nbehavior.\n\nv1.45 inherits from Pod::Simple as opposed to all previous versions\ninheriting from Pod::Parser. Do not use Pod::Simple's interface when\nusing Pod::Checker unless it is documented somewhere on this page. I\nrepeat, DO NOT USE POD::SIMPLE'S INTERFACE.\n\nThe following list documents the overrides to Pod::Simple, primarily to\nmake Pod::Coverage happy:\n\nendB\nendC\nendDocument\nendF\nendI\nendL\nendPara\nendS\nendX\nendfcode\nendfor\nendhead\nendhead1\nendhead2\nendhead3\nendhead4\nenditem\nenditembullet\nenditemnumber\nenditemtext\nhandlepodandcut\nhandletext\nhandlewhiteline\nhyperlink\nscream\nstartB\nstartC\nstartData\nstartF\nstartI\nstartL\nstartPara\nstartS\nstartVerbatim\nstartX\nstartfcode\nstartfor\nstarthead\nstarthead1\nstarthead2\nstarthead3\nstarthead4\nstartitembullet\nstartitemnumber\nstartitemtext\nstartover\nstartoverblock\nstartoverbullet\nstartoverempty\nstartovernumber\nstartovertext\nwhine\n\n\"Pod::Checker->new( %options )\"\nReturn a reference to a new Pod::Checker object that inherits from\nPod::Simple and is used for calling the required methods later. The\nfollowing options are recognized:\n\n\"-warnings => num\" Print warnings if \"num\" is true. The higher the\nvalue of \"num\", the more warnings are printed. Currently there are\nonly levels 1 and 2.\n\n\"-quiet => num\" If \"num\" is true, do not print any errors/warnings.\nThis is useful when Pod::Checker is used to munge POD code into\nplain text from within POD formatters.\n\n\"$checker->poderror( @args )\"\n\"$checker->poderror( {%opts}, @args )\"\nInternal method for printing errors and warnings. If no options are\ngiven, simply prints \"@\". The following options are recognized and\nused to form the output:\n\n-msg\n\nA message to print prior to @args.\n\n-line\n\nThe line number the error occurred in.\n\n-file\n\nThe file (name) the error occurred in. Defaults to the name of the\ncurrent file being processed.\n\n-severity\n\nThe error level, should be 'WARNING' or 'ERROR'.\n\n\"$checker->numerrors()\"\nSet (if argument specified) and retrieve the number of errors found.\n\n\"$checker->numwarnings()\"\nSet (if argument specified) and retrieve the number of warnings\nfound.\n\n\"$checker->name()\"\nSet (if argument specified) and retrieve the canonical name of POD\nas found in the \"=head1 NAME\" section.\n\n\"$checker->node()\"\nAdd (if argument specified) and retrieve the nodes (as defined by\n\"=headX\" and \"=item\") of the current POD. The nodes are returned in\nthe order of their occurrence. They consist of plain text, each\npiece of whitespace is collapsed to a single blank.\n\n\"$checker->idx()\"\nAdd (if argument specified) and retrieve the index entries (as\ndefined by \"X<>\") of the current POD. They consist of plain text,\neach piece of whitespace is collapsed to a single blank.\n\n\"$checker->hyperlinks()\"\nRetrieve an array containing the hyperlinks to things outside the\ncurrent POD (as defined by \"L<>\").\n\nEach is an instance of a class with the following methods:\n\nline()\nReturns the approximate line number in which the link was\nencountered\n\ntype()\nReturns the type of the link; one of: \"url\" for things like\n\"http://www.foo\", \"man\" for man pages, or \"pod\".\n\npage()\nReturns the linked-to page or url.\n\nnode()\nReturns the anchor or node within the linked-to page, or an empty\nstring (\"\") if none appears in the link.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Please report bugs using <http://rt.cpan.org>.\n\nBrad Appleton <bradapp@enteract.com> (initial version), Marek Rouchal\n<marekr@cpan.org>, Marc Green <marcgreen@cpan.org> (port to Pod::Simple)\nRicardo Signes <rjbs@cpan.org> (more porting to Pod::Simple) Karl\nWilliamson <khw@cpan.org> (more porting to Pod::Simple)\n\nBased on code for Pod::Text::pod2text() written by Tom Christiansen\n<tchrist@mox.perl.com>\n",
            "subsections": []
        }
    },
    "summary": "Pod::Checker - check pod documents for syntax errors",
    "flags": [],
    "examples": [
        "See \"SYNOPSIS\""
    ],
    "see_also": []
}