{
    "content": [
        {
            "type": "text",
            "text": "# Pod::Usage (perldoc)\n\n**Summary:** Pod::Usage - extracts POD documentation and shows usage information\n\n**Synopsis:** use Pod::Usage;\nmy $messagetext  = \"This text precedes the usage message.\";\nmy $exitstatus   = 2;          ## The exit status to use\nmy $verboselevel = 0;          ## The verbose level to use\nmy $filehandle    = \\*STDERR;   ## The filehandle to write to\npod2usage($messagetext);\npod2usage($exitstatus);\npod2usage( { -message => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle } );\npod2usage(   -msg     => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle );\npod2usage(   -verbose => 2,\n-noperldoc => 1  );\npod2usage(   -verbose => 2,\n-perlcmd => $pathtoperl,\n-perldoc => $pathtoperldoc,\n-perldocopt => $perldocoptions );\n\n## Examples\n\n- `Each of the following invocations of \"pod2usage()\" will print just the \"SYNOPSIS\" section to`\n- `\"STDERR\" and will exit with a status of 2:`\n- `pod2usage();`\n- `pod2usage(2);`\n- `pod2usage(-verbose => 0);`\n- `pod2usage(-exitval => 2);`\n- `pod2usage({-exitval => 2, -output => \\*STDERR});`\n- `pod2usage({-verbose => 0, -output  => \\*STDERR});`\n- `pod2usage(-exitval => 2, -verbose => 0);`\n- `pod2usage(-exitval => 2, -verbose => 0, -output => \\*STDERR);`\n- `Each of the following invocations of \"pod2usage()\" will print a message of \"Syntax error.\"`\n- `(followed by a newline) to \"STDERR\", immediately followed by just the \"SYNOPSIS\" section (also`\n- `printed to \"STDERR\") and will exit with a status of 2:`\n- `pod2usage(\"Syntax error.\");`\n- `pod2usage(-message => \"Syntax error.\", -verbose => 0);`\n- `pod2usage(-msg  => \"Syntax error.\", -exitval => 2);`\n- `pod2usage({-msg => \"Syntax error.\", -exitval => 2, -output => \\*STDERR});`\n- `pod2usage({-msg => \"Syntax error.\", -verbose => 0, -output => \\*STDERR});`\n- `pod2usage(-msg  => \"Syntax error.\", -exitval => 2, -verbose => 0);`\n- `pod2usage(-message => \"Syntax error.\",`\n- `-exitval => 2,`\n- `-verbose => 0,`\n- `-output  => \\*STDERR);`\n- `Each of the following invocations of \"pod2usage()\" will print the \"SYNOPSIS\" section and any`\n- `\"OPTIONS\" and/or \"ARGUMENTS\" sections to \"STDOUT\" and will exit with a status of 1:`\n- `pod2usage(1);`\n- `pod2usage(-verbose => 1);`\n- `pod2usage(-exitval => 1);`\n- `pod2usage({-exitval => 1, -output => \\*STDOUT});`\n- `pod2usage({-verbose => 1, -output => \\*STDOUT});`\n- `pod2usage(-exitval => 1, -verbose => 1);`\n- `pod2usage(-exitval => 1, -verbose => 1, -output => \\*STDOUT});`\n- `Each of the following invocations of \"pod2usage()\" will print the entire manual page to \"STDOUT\"`\n- `and will exit with a status of 1:`\n- `pod2usage(-verbose  => 2);`\n- `pod2usage({-verbose => 2, -output => \\*STDOUT});`\n- `pod2usage(-exitval  => 1, -verbose => 2);`\n- `pod2usage({-exitval => 1, -verbose => 2, -output => \\*STDOUT});`\n- `Most scripts should print some type of usage message to \"STDERR\" when a command line syntax`\n- `error is detected. They should also provide an option (usually \"-H\" or \"-help\") to print a`\n- `(possibly more verbose) usage message to \"STDOUT\". Some scripts may even wish to go so far as to`\n- `provide a means of printing their complete documentation to \"STDOUT\" (perhaps by allowing a`\n- `\"-man\" option). The following complete example uses Pod::Usage in combination with Getopt::Long`\n- `to do all of these things:`\n- `use strict;`\n- `use Getopt::Long qw(GetOptions);`\n- `use Pod::Usage qw(pod2usage);`\n- `my $man = 0;`\n- `my $help = 0;`\n- `## Parse options and print usage if there is a syntax error,`\n- `## or if usage was explicitly requested.`\n- `GetOptions('help|?' => \\$help, man => \\$man) or pod2usage(2);`\n- `pod2usage(1) if $help;`\n- `pod2usage(-verbose => 2) if $man;`\n- `## If no arguments were given, then allow STDIN to be used only`\n- `## if it's not connected to a terminal (otherwise print usage)`\n- `pod2usage(\"$0: No files given.\")  if ((@ARGV == 0) && (-t STDIN));`\n- `END`\n- `=head1 NAME`\n- `sample - Using GetOpt::Long and Pod::Usage`\n- `=head1 SYNOPSIS`\n- `sample [options] [file ...]`\n- `Options:`\n- `-help            brief help message`\n- `-man             full documentation`\n- `=head1 OPTIONS`\n- `=over 4`\n- `=item B<-help>`\n- `Print a brief help message and exits.`\n- `=item B<-man>`\n- `Prints the manual page and exits.`\n- `=back`\n- `=head1 DESCRIPTION`\n- `B<This program> will read the given input file(s) and do something`\n- `useful with the contents thereof.`\n- `=cut`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (29 lines)\n- **ARGUMENTS** (105 lines) — 2 subsections\n  - Formatting base class (11 lines)\n  - Pass-through options (5 lines)\n- **DESCRIPTION** (85 lines) — 1 subsections\n  - Scripts (3 lines)\n- **EXAMPLES** (68 lines) — 1 subsections\n  - Recommended Use (58 lines)\n- **CAVEATS** (16 lines)\n- **SUPPORT** (10 lines)\n- **AUTHOR** (8 lines)\n- **LICENSE** (2 lines)\n- **ACKNOWLEDGMENTS** (6 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nPod::Usage - extracts POD documentation and shows usage information\n\n### SYNOPSIS\n\nuse Pod::Usage;\n\nmy $messagetext  = \"This text precedes the usage message.\";\nmy $exitstatus   = 2;          ## The exit status to use\nmy $verboselevel = 0;          ## The verbose level to use\nmy $filehandle    = \\*STDERR;   ## The filehandle to write to\n\npod2usage($messagetext);\n\npod2usage($exitstatus);\n\npod2usage( { -message => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle } );\n\npod2usage(   -msg     => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle );\n\npod2usage(   -verbose => 2,\n-noperldoc => 1  );\n\npod2usage(   -verbose => 2,\n-perlcmd => $pathtoperl,\n-perldoc => $pathtoperldoc,\n-perldocopt => $perldocoptions );\n\n### ARGUMENTS\n\npod2usage should be given either a single argument, or a list of arguments corresponding to an\nassociative array (a \"hash\"). When a single argument is given, it should correspond to exactly\none of the following:\n\n*   A string containing the text of a message to print *before* printing the usage message\n\n*   A numeric value corresponding to the desired exit status\n\n*   A reference to a hash\n\nIf more than one argument is given then the entire argument list is assumed to be a hash. If a\nhash is supplied (either as a reference or as a list) it should contain one or more elements\nwith the following keys:\n\n\"-message\" *string*\n\"-msg\" *string*\nThe text of a message to print immediately prior to printing the program's usage message.\n\n\"-exitval\" *value*\nThe desired exit status to pass to the exit() function. This should be an integer, or else\nthe string \"NOEXIT\" to indicate that control should simply be returned without terminating\nthe invoking process.\n\n\"-verbose\" *value*\nThe desired level of \"verboseness\" to use when printing the usage message. If the value is\n0, then only the \"SYNOPSIS\" and/or \"USAGE\" sections of the pod documentation are printed. If\nthe value is 1, then the \"SYNOPSIS\" and/or \"USAGE\" sections, along with any section entitled\n\"OPTIONS\", \"ARGUMENTS\", or \"OPTIONS AND ARGUMENTS\" is printed. If the corresponding value is\n2 or more then the entire manpage is printed, using perldoc if available; otherwise\nPod::Text is used for the formatting. For better readability, the all-capital headings are\ndowncased, e.g. \"SYNOPSIS\" => \"Synopsis\".\n\nThe special verbosity level 99 requires to also specify the -sections parameter; then these\nsections are extracted and printed.\n\n\"-sections\" *spec*\nThere are two ways to specify the selection. Either a string (scalar) representing a\nselection regexp for sections to be printed when -verbose is set to 99, e.g.\n\n\"NAME|SYNOPSIS|DESCRIPTION|VERSION\"\n\nWith the above regexp all content following (and including) any of the given \"=head1\"\nheadings will be shown. It is possible to restrict the output to particular subsections\nonly, e.g.:\n\n\"DESCRIPTION/Algorithm\"\n\nThis will output only the \"=head2 Algorithm\" heading and content within the \"=head1\nDESCRIPTION\" section. The regexp binding is stronger than the section separator, such that\ne.g.:\n\n\"DESCRIPTION|OPTIONS|ENVIRONMENT/Caveats\"\n\nwill print any \"=head2 Caveats\" section (only) within any of the three \"=head1\" sections.\n\nAlternatively, an array reference of section specifications can be used:\n\npod2usage(-verbose => 99, -sections => [\nqw(DESCRIPTION DESCRIPTION/Introduction) ] );\n\nThis will print only the content of \"=head1 DESCRIPTION\" and the \"=head2 Introduction\"\nsections, but no other \"=head2\", and no other \"=head1\" either.\n\n\"-output\" *handle*\nA reference to a filehandle, or the pathname of a file to which the usage message should be\nwritten. The default is \"\\*STDERR\" unless the exit value is less than 2 (in which case the\ndefault is \"\\*STDOUT\").\n\n\"-input\" *handle*\nA reference to a filehandle, or the pathname of a file from which the invoking script's pod\ndocumentation should be read. It defaults to the file indicated by $0 ($PROGRAMNAME for\nusers of English.pm).\n\nIf you are calling pod2usage() from a module and want to display that module's POD, you can\nuse this:\n\nuse Pod::Find qw(podwhere);\npod2usage( -input => podwhere({-inc => 1}, PACKAGE) );\n\n\"-pathlist\" *string*\nA list of directory paths. If the input file does not exist, then it will be searched for in\nthe given directory list (in the order the directories appear in the list). It defaults to\nthe list of directories implied by $ENV{PATH}. The list may be specified either by a\nreference to an array, or by a string of directory paths which use the same path separator\nas $ENV{PATH} on your system (e.g., \":\" for Unix, \";\" for MSWin32 and DOS).\n\n\"-noperldoc\"\nBy default, Pod::Usage will call perldoc when -verbose >= 2 is specified. This does not work\nwell e.g. if the script was packed with PAR. This option suppresses the external call to\nperldoc and uses the simple text formatter (Pod::Text) to output the POD.\n\n\"-perlcmd\"\nBy default, Pod::Usage will call perldoc when -verbose >= 2 is specified. In case of special\nor unusual Perl installations, this option may be used to supply the path to a perl\nexecutable which should run perldoc.\n\n\"-perldoc\" *path-to-perldoc*\nBy default, Pod::Usage will call perldoc when -verbose >= 2 is specified. In case perldoc is\nnot installed where the perl interpreter thinks it is (see Config), the -perldoc option may\nbe used to supply the correct path to perldoc.\n\n\"-perldocopt\" *string*\nBy default, Pod::Usage will call perldoc when -verbose >= 2 is specified. This option may be\nused to supply options to perldoc. The string may contain several, space-separated options.\n\n#### Formatting base class\n\nThe default text formatter is Pod::Text. The base class for Pod::Usage can be defined by\npre-setting $Pod::Usage::Formatter *before* loading Pod::Usage, e.g.:\n\nBEGIN { $Pod::Usage::Formatter = 'Pod::Text::Termcap'; }\nuse Pod::Usage qw(pod2usage);\n\nPod::Usage uses Pod::Simple's handleelementend() method to implement the section selection,\nand in case of verbosity < 2 it down-cases the all-caps headings to first capital letter and\nrest lowercase, and adds a colon/newline at the end of the headings, for better readability.\nSame for verbosity = 99.\n\n#### Pass-through options\n\nThe following options are passed through to the underlying text formatter. See the manual pages\nof these modules for more information.\n\nalt code indent loose margin quotes sentence stderr utf8 width\n\n### DESCRIPTION\n\npod2usage will print a usage message for the invoking script (using its embedded pod\ndocumentation) and then exit the script with the desired exit status. The usage message printed\nmay have any one of three levels of \"verboseness\": If the verbose level is 0, then only a\nsynopsis is printed. If the verbose level is 1, then the synopsis is printed along with a\ndescription (if present) of the command line options and arguments. If the verbose level is 2,\nthen the entire manual page is printed.\n\nUnless they are explicitly specified, the default values for the exit status, verbose level, and\noutput stream to use are determined as follows:\n\n*   If neither the exit status nor the verbose level is specified, then the default is to use an\nexit status of 2 with a verbose level of 0.\n\n*   If an exit status *is* specified but the verbose level is *not*, then the verbose level will\ndefault to 1 if the exit status is less than 2 and will default to 0 otherwise.\n\n*   If an exit status is *not* specified but verbose level *is* given, then the exit status will\ndefault to 2 if the verbose level is 0 and will default to 1 otherwise.\n\n*   If the exit status used is less than 2, then output is printed on \"STDOUT\". Otherwise output\nis printed on \"STDERR\".\n\nAlthough the above may seem a bit confusing at first, it generally does \"the right thing\" in\nmost situations. This determination of the default values to use is based upon the following\ntypical Unix conventions:\n\n*   An exit status of 0 implies \"success\". For example, diff(1) exits with a status of 0 if the\ntwo files have the same contents.\n\n*   An exit status of 1 implies possibly abnormal, but non-defective, program termination. For\nexample, grep(1) exits with a status of 1 if it did *not* find a matching line for the given\nregular expression.\n\n*   An exit status of 2 or more implies a fatal error. For example, ls(1) exits with a status of\n2 if you specify an illegal (unknown) option on the command line.\n\n*   Usage messages issued as a result of bad command-line syntax should go to \"STDERR\". However,\nusage messages issued due to an explicit request to print usage (like specifying -help on\nthe command line) should go to \"STDOUT\", just in case the user wants to pipe the output to a\npager (such as more(1)).\n\n*   If program usage has been explicitly requested by the user, it is often desirable to exit\nwith a status of 1 (as opposed to 0) after issuing the user-requested usage message. It is\nalso desirable to give a more verbose description of program usage in this case.\n\npod2usage does not force the above conventions upon you, but it will use them by default if you\ndon't expressly tell it to do otherwise. The ability of pod2usage() to accept a single number or\na string makes it convenient to use as an innocent looking error message handling function:\n\nuse strict;\nuse Pod::Usage;\nuse Getopt::Long;\n\n## Parse options\nmy %opt;\nGetOptions(\\%opt, \"help|?\", \"man\", \"flag1\")  ||  pod2usage(2);\npod2usage(1)  if ($opt{help});\npod2usage(-exitval => 0, -verbose => 2)  if ($opt{man});\n\n## Check for too many filenames\npod2usage(\"$0: Too many files given.\\n\")  if (@ARGV > 1);\n\nSome user's however may feel that the above \"economy of expression\" is not particularly readable\nnor consistent and may instead choose to do something more like the following:\n\nuse strict;\nuse Pod::Usage qw(pod2usage);\nuse Getopt::Long qw(GetOptions);\n\n## Parse options\nmy %opt;\nGetOptions(\\%opt, \"help|?\", \"man\", \"flag1\")  ||\npod2usage(-verbose => 0);\n\npod2usage(-verbose => 1)  if ($opt{help});\npod2usage(-verbose => 2)  if ($opt{man});\n\n## Check for too many filenames\npod2usage(-verbose => 2, -message => \"$0: Too many files given.\\n\")\nif (@ARGV > 1);\n\nAs with all things in Perl, *there's more than one way to do it*, and pod2usage() adheres to\nthis philosophy. If you are interested in seeing a number of different ways to invoke pod2usage\n(although by no means exhaustive), please refer to \"EXAMPLES\".\n\n#### Scripts\n\nThe Pod::Usage distribution comes with a script pod2usage which offers a command line interface\nto the functionality of Pod::Usage. See pod2usage.\n\n### EXAMPLES\n\nEach of the following invocations of \"pod2usage()\" will print just the \"SYNOPSIS\" section to\n\"STDERR\" and will exit with a status of 2:\n\npod2usage();\n\npod2usage(2);\n\npod2usage(-verbose => 0);\n\npod2usage(-exitval => 2);\n\npod2usage({-exitval => 2, -output => \\*STDERR});\n\npod2usage({-verbose => 0, -output  => \\*STDERR});\n\npod2usage(-exitval => 2, -verbose => 0);\n\npod2usage(-exitval => 2, -verbose => 0, -output => \\*STDERR);\n\nEach of the following invocations of \"pod2usage()\" will print a message of \"Syntax error.\"\n(followed by a newline) to \"STDERR\", immediately followed by just the \"SYNOPSIS\" section (also\nprinted to \"STDERR\") and will exit with a status of 2:\n\npod2usage(\"Syntax error.\");\n\npod2usage(-message => \"Syntax error.\", -verbose => 0);\n\npod2usage(-msg  => \"Syntax error.\", -exitval => 2);\n\npod2usage({-msg => \"Syntax error.\", -exitval => 2, -output => \\*STDERR});\n\npod2usage({-msg => \"Syntax error.\", -verbose => 0, -output => \\*STDERR});\n\npod2usage(-msg  => \"Syntax error.\", -exitval => 2, -verbose => 0);\n\npod2usage(-message => \"Syntax error.\",\n-exitval => 2,\n-verbose => 0,\n-output  => \\*STDERR);\n\nEach of the following invocations of \"pod2usage()\" will print the \"SYNOPSIS\" section and any\n\"OPTIONS\" and/or \"ARGUMENTS\" sections to \"STDOUT\" and will exit with a status of 1:\n\npod2usage(1);\n\npod2usage(-verbose => 1);\n\npod2usage(-exitval => 1);\n\npod2usage({-exitval => 1, -output => \\*STDOUT});\n\npod2usage({-verbose => 1, -output => \\*STDOUT});\n\npod2usage(-exitval => 1, -verbose => 1);\n\npod2usage(-exitval => 1, -verbose => 1, -output => \\*STDOUT});\n\nEach of the following invocations of \"pod2usage()\" will print the entire manual page to \"STDOUT\"\nand will exit with a status of 1:\n\npod2usage(-verbose  => 2);\n\npod2usage({-verbose => 2, -output => \\*STDOUT});\n\npod2usage(-exitval  => 1, -verbose => 2);\n\npod2usage({-exitval => 1, -verbose => 2, -output => \\*STDOUT});\n\n#### Recommended Use\n\nMost scripts should print some type of usage message to \"STDERR\" when a command line syntax\nerror is detected. They should also provide an option (usually \"-H\" or \"-help\") to print a\n(possibly more verbose) usage message to \"STDOUT\". Some scripts may even wish to go so far as to\nprovide a means of printing their complete documentation to \"STDOUT\" (perhaps by allowing a\n\"-man\" option). The following complete example uses Pod::Usage in combination with Getopt::Long\nto do all of these things:\n\nuse strict;\nuse Getopt::Long qw(GetOptions);\nuse Pod::Usage qw(pod2usage);\n\nmy $man = 0;\nmy $help = 0;\n## Parse options and print usage if there is a syntax error,\n## or if usage was explicitly requested.\nGetOptions('help|?' => \\$help, man => \\$man) or pod2usage(2);\npod2usage(1) if $help;\npod2usage(-verbose => 2) if $man;\n\n## If no arguments were given, then allow STDIN to be used only\n## if it's not connected to a terminal (otherwise print usage)\npod2usage(\"$0: No files given.\")  if ((@ARGV == 0) && (-t STDIN));\n\nEND\n\n=head1 NAME\n\nsample - Using GetOpt::Long and Pod::Usage\n\n=head1 SYNOPSIS\n\nsample [options] [file ...]\n\nOptions:\n-help            brief help message\n-man             full documentation\n\n=head1 OPTIONS\n\n=over 4\n\n=item B<-help>\n\nPrint a brief help message and exits.\n\n=item B<-man>\n\nPrints the manual page and exits.\n\n=back\n\n=head1 DESCRIPTION\n\nB<This program> will read the given input file(s) and do something\nuseful with the contents thereof.\n\n=cut\n\n### CAVEATS\n\nBy default, pod2usage() will use $0 as the path to the pod input file. Unfortunately, not all\nsystems on which Perl runs will set $0 properly (although if $0 is not found, pod2usage() will\nsearch $ENV{PATH} or else the list specified by the \"-pathlist\" option). If this is the case for\nyour system, you may need to explicitly specify the path to the pod docs for the invoking script\nusing something similar to the following:\n\npod2usage(-exitval => 2, -input => \"/path/to/your/pod/docs\");\n\nIn the pathological case that a script is called via a relative path *and* the script itself\nchanges the current working directory (see \"chdir\" in perlfunc) *before* calling pod2usage,\nPod::Usage will fail even on robust platforms. Don't do that. Or use FindBin to locate the\nscript:\n\nuse FindBin;\npod2usage(-input => $FindBin::Bin . \"/\" . $FindBin::Script);\n\n### SUPPORT\n\nThis module is managed in a GitHub repository, <https://github.com/Dual-Life/Pod-Usage> Feel\nfree to fork and contribute, or to clone and send patches!\n\nPlease use <https://github.com/Dual-Life/Pod-Usage/issues/new> to file a bug report. The\nprevious ticketing system, <https://rt.cpan.org/Dist/Display.html?Queue=Pod-Usage>, is\ndeprecated for this package.\n\nMore general questions or discussion about POD should be sent to the \"pod-people@perl.org\" mail\nlist. Send an empty email to \"pod-people-subscribe@perl.org\" to subscribe.\n\n### AUTHOR\n\nMarek Rouchal <marekr@cpan.org>\n\nNicolas R <nicolas@atoomic.org>\n\nBrad Appleton <bradapp@enteract.com>\n\nBased on code for Pod::Text::pod2text() written by Tom Christiansen <tchrist@mox.perl.com>\n\n### LICENSE\n\nPod::Usage (the distribution) is licensed under the same terms as Perl.\n\n### ACKNOWLEDGMENTS\n\nNicolas R (ATOOMIC) for setting up the Github repo and modernizing this package.\n\nrjbs for refactoring Pod::Usage to not use Pod::Parser any more.\n\nSteven McDougall <swmcd@world.std.com> for his help and patience with re-writing this manpage.\n\n### SEE ALSO\n\nPod::Usage is now a standalone distribution, depending on Pod::Text which in turn depends on\nPod::Simple.\n\nPod::Perldoc, Getopt::Long, Pod::Find, FindBin, Pod::Text, Pod::Text::Termcap, Pod::Simple\n\n"
        }
    ],
    "structuredContent": {
        "command": "Pod::Usage",
        "section": "",
        "mode": "perldoc",
        "summary": "Pod::Usage - extracts POD documentation and shows usage information",
        "synopsis": "use Pod::Usage;\nmy $messagetext  = \"This text precedes the usage message.\";\nmy $exitstatus   = 2;          ## The exit status to use\nmy $verboselevel = 0;          ## The verbose level to use\nmy $filehandle    = \\*STDERR;   ## The filehandle to write to\npod2usage($messagetext);\npod2usage($exitstatus);\npod2usage( { -message => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle } );\npod2usage(   -msg     => $messagetext ,\n-exitval => $exitstatus  ,\n-verbose => $verboselevel,\n-output  => $filehandle );\npod2usage(   -verbose => 2,\n-noperldoc => 1  );\npod2usage(   -verbose => 2,\n-perlcmd => $pathtoperl,\n-perldoc => $pathtoperldoc,\n-perldocopt => $perldocoptions );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Each of the following invocations of \"pod2usage()\" will print just the \"SYNOPSIS\" section to",
            "\"STDERR\" and will exit with a status of 2:",
            "pod2usage();",
            "pod2usage(2);",
            "pod2usage(-verbose => 0);",
            "pod2usage(-exitval => 2);",
            "pod2usage({-exitval => 2, -output => \\*STDERR});",
            "pod2usage({-verbose => 0, -output  => \\*STDERR});",
            "pod2usage(-exitval => 2, -verbose => 0);",
            "pod2usage(-exitval => 2, -verbose => 0, -output => \\*STDERR);",
            "Each of the following invocations of \"pod2usage()\" will print a message of \"Syntax error.\"",
            "(followed by a newline) to \"STDERR\", immediately followed by just the \"SYNOPSIS\" section (also",
            "printed to \"STDERR\") and will exit with a status of 2:",
            "pod2usage(\"Syntax error.\");",
            "pod2usage(-message => \"Syntax error.\", -verbose => 0);",
            "pod2usage(-msg  => \"Syntax error.\", -exitval => 2);",
            "pod2usage({-msg => \"Syntax error.\", -exitval => 2, -output => \\*STDERR});",
            "pod2usage({-msg => \"Syntax error.\", -verbose => 0, -output => \\*STDERR});",
            "pod2usage(-msg  => \"Syntax error.\", -exitval => 2, -verbose => 0);",
            "pod2usage(-message => \"Syntax error.\",",
            "-exitval => 2,",
            "-verbose => 0,",
            "-output  => \\*STDERR);",
            "Each of the following invocations of \"pod2usage()\" will print the \"SYNOPSIS\" section and any",
            "\"OPTIONS\" and/or \"ARGUMENTS\" sections to \"STDOUT\" and will exit with a status of 1:",
            "pod2usage(1);",
            "pod2usage(-verbose => 1);",
            "pod2usage(-exitval => 1);",
            "pod2usage({-exitval => 1, -output => \\*STDOUT});",
            "pod2usage({-verbose => 1, -output => \\*STDOUT});",
            "pod2usage(-exitval => 1, -verbose => 1);",
            "pod2usage(-exitval => 1, -verbose => 1, -output => \\*STDOUT});",
            "Each of the following invocations of \"pod2usage()\" will print the entire manual page to \"STDOUT\"",
            "and will exit with a status of 1:",
            "pod2usage(-verbose  => 2);",
            "pod2usage({-verbose => 2, -output => \\*STDOUT});",
            "pod2usage(-exitval  => 1, -verbose => 2);",
            "pod2usage({-exitval => 1, -verbose => 2, -output => \\*STDOUT});",
            "Most scripts should print some type of usage message to \"STDERR\" when a command line syntax",
            "error is detected. They should also provide an option (usually \"-H\" or \"-help\") to print a",
            "(possibly more verbose) usage message to \"STDOUT\". Some scripts may even wish to go so far as to",
            "provide a means of printing their complete documentation to \"STDOUT\" (perhaps by allowing a",
            "\"-man\" option). The following complete example uses Pod::Usage in combination with Getopt::Long",
            "to do all of these things:",
            "use strict;",
            "use Getopt::Long qw(GetOptions);",
            "use Pod::Usage qw(pod2usage);",
            "my $man = 0;",
            "my $help = 0;",
            "## Parse options and print usage if there is a syntax error,",
            "## or if usage was explicitly requested.",
            "GetOptions('help|?' => \\$help, man => \\$man) or pod2usage(2);",
            "pod2usage(1) if $help;",
            "pod2usage(-verbose => 2) if $man;",
            "## If no arguments were given, then allow STDIN to be used only",
            "## if it's not connected to a terminal (otherwise print usage)",
            "pod2usage(\"$0: No files given.\")  if ((@ARGV == 0) && (-t STDIN));",
            "END",
            "=head1 NAME",
            "sample - Using GetOpt::Long and Pod::Usage",
            "=head1 SYNOPSIS",
            "sample [options] [file ...]",
            "Options:",
            "-help            brief help message",
            "-man             full documentation",
            "=head1 OPTIONS",
            "=over 4",
            "=item B<-help>",
            "Print a brief help message and exits.",
            "=item B<-man>",
            "Prints the manual page and exits.",
            "=back",
            "=head1 DESCRIPTION",
            "B<This program> will read the given input file(s) and do something",
            "useful with the contents thereof.",
            "=cut"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "ARGUMENTS",
                "lines": 105,
                "subsections": [
                    {
                        "name": "Formatting base class",
                        "lines": 11
                    },
                    {
                        "name": "Pass-through options",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 85,
                "subsections": [
                    {
                        "name": "Scripts",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 68,
                "subsections": [
                    {
                        "name": "Recommended Use",
                        "lines": 58
                    }
                ]
            },
            {
                "name": "CAVEATS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGMENTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}