{
    "content": [
        {
            "type": "text",
            "text": "# Pod::Checker (perldoc)\n\n## NAME\n\nPod::Checker - check pod documents for syntax errors\n\n## SYNOPSIS\n\nuse Pod::Checker;\n$syntaxokay = podchecker($filepath, $outputpath, %options);\nmy $checker = Pod::Checker->new(%options);\n$checker->parsefromfile($filepath, \\*STDERR);\n\n## DESCRIPTION\n\npodchecker will perform syntax checking of Perl5 POD format documentation.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **OPTIONS/ARGUMENTS**\n- **DESCRIPTION**\n- **DIAGNOSTICS** (3 subsections)\n- **RETURN VALUE**\n- **EXAMPLES**\n- **SCRIPTS**\n- **INTERFACE** (4 subsections)\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Pod::Checker",
        "section": "",
        "mode": "perldoc",
        "summary": "Pod::Checker - check pod documents for syntax errors",
        "synopsis": "use Pod::Checker;\n$syntaxokay = podchecker($filepath, $outputpath, %options);\nmy $checker = Pod::Checker->new(%options);\n$checker->parsefromfile($filepath, \\*STDERR);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "See \"SYNOPSIS\""
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS/ARGUMENTS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Errors",
                        "lines": 106
                    },
                    {
                        "name": "Warnings",
                        "lines": 72
                    },
                    {
                        "name": "Hyperlinks",
                        "lines": 19
                    }
                ]
            },
            {
                "name": "RETURN VALUE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SCRIPTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "INTERFACE",
                "lines": 128,
                "subsections": [
                    {
                        "name": "line",
                        "lines": 2
                    },
                    {
                        "name": "type",
                        "lines": 3
                    },
                    {
                        "name": "page",
                        "lines": 2
                    },
                    {
                        "name": "node",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 8,
                "subsections": []
            }
        ],
        "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 syntax error messages.\nEither argument may be a scalar indicating a file-path, or else a reference to an open\nfilehandle. If unspecified, the input-file it defaults to \"\\*STDIN\", and the output-file\ndefaults to \"\\*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 trigger additional\nwarnings. 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 documentation.\n\nCurious/ambitious users are welcome to propose additional features they wish to see in\nPod::Checker and podchecker and verify that the checks are consistent with perlpod.\n\nThe following checks are currently performed:\n\n*   Unknown '=xxxx' commands, unknown 'X<...>' interior-sequences, and unterminated interior\nsequences.\n\n*   Check for proper balancing of \"=begin\" and \"=end\". The contents of such a block are\ngenerally ignored, i.e. no syntax checks are performed.\n\n*   Check for proper nesting and balancing of \"=over\", \"=item\" and \"=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 details.\n\n*   Check for unresolved document-internal links. This check may also reveal misspelled links\nthat seem to be internal links but should be links 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 heading!\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 next heading (\"=head1\"\nor \"=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 \"=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 positive 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 specification.\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 directives.\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 current POD. This also\nhappened when a single word node name is not enclosed in \"\".\n\n*   Unknown directive: *CMD*\n\nAn invalid POD command has been found. Valid are \"=head1\", \"=head2\", \"=head3\", \"=head4\",\n\"=over\", \"=item\", \"=back\", \"=begin\", \"=end\", \"=for\", \"=pod\", \"=cut\"\n\n*   Deleting unknown formatting code *SEQ*\n\nAn invalid markup command has been encountered. Valid are: \"B<>\", \"C<>\", \"E<>\", \"F<>\",\n\"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* lines 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 does 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 same text. Potential\nhyperlinks to such a text cannot be unique then. This warning is printed only with warning\nlevel greater than one.\n\n*   line containing nothing but whitespace in paragraph\n\nThere is some whitespace on a seemingly empty line. POD is very sensitive to such things, so\nthis is flagged. vi users switch on the list 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 to delete empty items.\n\n*   You can't have =items (as at line *N*) unless the first thing after the =over is an =item\n\nA list introduced by \"=over\" starts with a text or verbatim paragraph, but continues with\n\"=item\"s. Move the non-item paragraph out 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 definition =item\n\nA list started with e.g. a bullet-like \"=item\" and continued with a numbered one. This is\nobviously inconsistent. For most translators the type of the *first* \"=item\" determines the\ntype 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 consecutively.\n\n*   Unknown E content in E<*CONTENT*>\n\nA character entity was found that does not belong to the standard ISO set or the POD\nspecials \"verbar\" and \"sol\". *Currently, this warning only appears if a character entity was\nfound that does not have a Unicode character. This should be fixed to adhere to the original\nwarning.*\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 contain any valid content.\nThis usually indicates that something is missing. Note: A \"=head1\" followed immediately by\n\"=head2\" does not trigger this warning.\n\n*   Verbatim paragraph in NAME section\n\nThe NAME section (\"=head1 NAME\") should consist of a single paragraph with the script/module\nname, followed by a dash `-' and a very 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 \"=head1\".\n\n*   A non-empty Z<>\n\nThe \"Z<>\" sequence is supposed to be empty. Caveat: this issue is detected in Pod::Simple\nand will be flagged as an *ERROR* by any client code; any contents of \"Z<...>\" will be\ndisregarded, 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 L<...>.\n\n*   alternative text/node '%s' contains non-escaped | or /\n\nThe characters \"|\" and \"/\" are special in the L<...> context. Although the hyperlink parser\ndoes its best to determine which \"/\" is text and which is a delimiter in case of doubt, one\nought to escape 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 number of the start of the\nparagraph in which the error/warning exists, not the line number that the error/warning is on.\nThis bug is present in errors/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 were no POD commands at\nall 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 wrapper around this module.\nSee the online manual with\n\npodchecker -help\npodchecker -man\n",
                "subsections": []
            },
            "INTERFACE": {
                "content": "While checking, this module collects document properties, e.g. the nodes for hyperlinks\n(\"=headX\", \"=item\") and index entries (\"X<>\"). POD translators can use this feature to\nsyntax-check and get the nodes in a first pass before actually starting to convert. This is\nexpensive in terms of execution time, but allows for very robust conversions.\n\nSince v1.24 the Pod::Checker module uses only the poderror method to print errors and warnings.\nThe summary output (e.g. \"Pod syntax OK\") has been dropped from the module and has been included\nin podchecker (the script). This allows users of Pod::Checker to control completely the output\nbehavior. Users of podchecker (the script) get the well-known behavior.\n\nv1.45 inherits from Pod::Simple as opposed to all previous versions inheriting from Pod::Parser.\nDo not use Pod::Simple's interface when using Pod::Checker unless it is documented somewhere on\nthis page. I repeat, DO NOT USE POD::SIMPLE'S INTERFACE.\n\nThe following list documents the overrides to Pod::Simple, primarily to make Pod::Coverage\nhappy:\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 Pod::Simple and is used\nfor calling the required methods later. The following options are recognized:\n\n\"-warnings => num\" Print warnings if \"num\" is true. The higher the value of \"num\", the more\nwarnings are printed. Currently there are only levels 1 and 2.\n\n\"-quiet => num\" If \"num\" is true, do not print any errors/warnings. This is useful when\nPod::Checker is used to munge POD code into plain 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 given, simply prints\n\"@\". The following options are recognized and used 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 current file being\nprocessed.\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 found.\n\n\"$checker->name()\"\nSet (if argument specified) and retrieve the canonical name of POD as found in the \"=head1\nNAME\" section.\n\n\"$checker->node()\"\nAdd (if argument specified) and retrieve the nodes (as defined by \"=headX\" and \"=item\") of\nthe current POD. The nodes are returned in the order of their occurrence. They consist of\nplain text, each piece of whitespace is collapsed to a single blank.\n\n\"$checker->idx()\"\nAdd (if argument specified) and retrieve the index entries (as defined by \"X<>\") of the\ncurrent POD. They consist of plain text, each piece of whitespace is collapsed to a single\nblank.\n\n\"$checker->hyperlinks()\"\nRetrieve an array containing the hyperlinks to things outside the current POD (as defined by\n\"L<>\").\n\nEach is an instance of a class with the following methods:\n",
                "subsections": [
                    {
                        "name": "line",
                        "content": "Returns the approximate line number in which the link was encountered\n"
                    },
                    {
                        "name": "type",
                        "content": "Returns the type of the link; one of: \"url\" for things like \"http://www.foo\", \"man\" for man\npages, or \"pod\".\n"
                    },
                    {
                        "name": "page",
                        "content": "Returns the linked-to page or url.\n"
                    },
                    {
                        "name": "node",
                        "content": "Returns the anchor or node within the linked-to page, or an empty string (\"\") if none\nappears in the link.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Please report bugs using <http://rt.cpan.org>.\n\nBrad Appleton <bradapp@enteract.com> (initial version), Marek Rouchal <marekr@cpan.org>, Marc\nGreen <marcgreen@cpan.org> (port to Pod::Simple) Ricardo Signes <rjbs@cpan.org> (more porting to\nPod::Simple) Karl Williamson <khw@cpan.org> (more porting to Pod::Simple)\n\nBased on code for Pod::Text::pod2text() written by Tom Christiansen <tchrist@mox.perl.com>\n",
                "subsections": []
            }
        }
    }
}