{
    "mode": "perldoc",
    "parameter": "Pod::Man",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Pod%3A%3AMan/json",
    "generated": "2026-06-13T21:27:28Z",
    "synopsis": "use Pod::Man;\nmy $parser = Pod::Man->new (release => $VERSION, section => 8);\n# Read POD from STDIN and write to STDOUT.\n$parser->parsefile (\\*STDIN);\n# Read POD from file.pod and write to file.1.\n$parser->parsefromfile ('file.pod', 'file.1');",
    "sections": {
        "NAME": {
            "content": "Pod::Man - Convert POD data to formatted *roff input\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Pod::Man;\nmy $parser = Pod::Man->new (release => $VERSION, section => 8);\n\n# Read POD from STDIN and write to STDOUT.\n$parser->parsefile (\\*STDIN);\n\n# Read POD from file.pod and write to file.1.\n$parser->parsefromfile ('file.pod', 'file.1');\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Pod::Man is a module to convert documentation in the POD format (the preferred language for\ndocumenting Perl) into *roff input using the man macro set. The resulting *roff code is suitable\nfor display on a terminal using nroff(1), normally via man(1), or printing using troff(1). It is\nconventionally invoked using the driver script pod2man, but it can also be used directly.\n\nAs a derived class from Pod::Simple, Pod::Man supports the same methods and interfaces. See\nPod::Simple for all the details.\n",
            "subsections": [
                {
                    "name": "new",
                    "content": "See below for details.\n\nIf no options are given, Pod::Man uses the name of the input file with any trailing \".pod\",\n\".pm\", or \".pl\" stripped as the man page title, to section 1 unless the file ended in \".pm\" in\nwhich case it defaults to section 3, to a centered title of \"User Contributed Perl\nDocumentation\", to a centered footer of the Perl version it is run with, and to a left-hand\nfooter of the modification date of its input (or the current date if given \"STDIN\" for input).\n\nPod::Man assumes that your *roff formatters have a fixed-width font named \"CW\". If yours is\ncalled something else (like \"CR\"), use the \"fixed\" option to specify it. This generally only\nmatters for troff output for printing. Similarly, you can set the fonts used for bold, italic,\nand bold italic fixed-width output.\n\nBesides the obvious pod conversions, Pod::Man also takes care of formatting func(), func(3), and\nsimple variable references like $foo or @bar so you don't have to use code escapes for them;\ncomplex expressions like $fred{'stuff'} will still need to be escaped, though. It also\ntranslates dashes that aren't used as hyphens into en dashes, makes long dashes--like this--into\nproper em dashes, fixes \"paired quotes,\" makes C++ look right, puts a little space between\ndouble underscores, makes ALLCAPS a teeny bit smaller in troff, and escapes stuff that *roff\ntreats as special so that you don't have to.\n\nThe recognized options to new() are as follows. All options take a single argument.\n\ncenter\nSets the centered page header for the \".TH\" macro. The default, if this option is not\nspecified, is \"User Contributed Perl Documentation\".\n\ndate\nSets the left-hand footer for the \".TH\" macro. If this option is not set, the contents of\nthe environment variable PODMANDATE, if set, will be used. Failing that, the value of\nSOURCEDATEEPOCH, the modification date of the input file, or the current time if stat()\ncan't find that file (which will be the case if the input is from \"STDIN\") will be used. If\nobtained from the file modification date or the current time, the date will be formatted as\n\"YYYY-MM-DD\" and will be based on UTC (so that the output will be reproducible regardless of\nlocal time zone).\n\nerrors\nHow to report errors. \"die\" says to throw an exception on any POD formatting error. \"stderr\"\nsays to report errors on standard error, but not to throw an exception. \"pod\" says to\ninclude a POD ERRORS section in the resulting documentation summarizing the errors. \"none\"\nignores POD errors entirely, as much as possible.\n\nThe default is \"pod\".\n\nfixed\nThe fixed-width font to use for verbatim text and code. Defaults to \"CW\". Some systems may\nwant \"CR\" instead. Only matters for troff output.\n\nfixedbold\nBold version of the fixed-width font. Defaults to \"CB\". Only matters for troff output.\n\nfixeditalic\nItalic version of the fixed-width font (actually, something of a misnomer, since most\nfixed-width fonts only have an oblique version, not an italic version). Defaults to \"CI\".\nOnly matters for troff output.\n\nfixedbolditalic\nBold italic (probably actually oblique) version of the fixed-width font. Pod::Man doesn't\nassume you have this, and defaults to \"CB\". Some systems (such as Solaris) have this font\navailable as \"CX\". Only matters for troff output.\n\nlquote\nrquote\nSets the quote marks used to surround C<> text. \"lquote\" sets the left quote mark and\n\"rquote\" sets the right quote mark. Either may also be set to the special value \"none\", in\nwhich case no quote mark is added on that side of C<> text (but the font is still changed\nfor troff output).\n\nAlso see the \"quotes\" option, which can be used to set both quotes at once. If both \"quotes\"\nand one of the other options is set, \"lquote\" or \"rquote\" overrides \"quotes\".\n\nname\nSet the name of the manual page for the \".TH\" macro. Without this option, the manual name is\nset to the uppercased base name of the file being converted unless the manual section is 3,\nin which case the path is parsed to see if it is a Perl module path. If it is, a path like\n\".../lib/Pod/Man.pm\" is converted into a name like \"Pod::Man\". This option, if given,\noverrides any automatic determination of the name.\n\nIf generating a manual page from standard input, the name will be set to \"STDIN\" if this\noption is not provided. Providing this option is strongly recommended to set a meaningful\nmanual page name.\n\nnourls\nNormally, L<> formatting codes with a URL but anchor text are formatted to show both the\nanchor text and the URL. In other words:\n\nL<foo|http://example.com/>\n\nis formatted as:\n\nfoo <http://example.com/>\n\nThis option, if set to a true value, suppresses the URL when anchor text is given, so this\nexample would be formatted as just \"foo\". This can produce less cluttered output in cases\nwhere the URLs are not particularly important.\n\nquotes\nSets the quote marks used to surround C<> text. If the value is a single character, it is\nused as both the left and right quote. Otherwise, it is split in half, and the first half of\nthe string is used as the left quote and the second is used as the right quote.\n\nThis may also be set to the special value \"none\", in which case no quote marks are added\naround C<> text (but the font is still changed for troff output).\n\nAlso see the \"lquote\" and \"rquote\" options, which can be used to set the left and right\nquotes independently. If both \"quotes\" and one of the other options is set, \"lquote\" or\n\"rquote\" overrides \"quotes\".\n\nrelease\nSet the centered footer for the \".TH\" macro. By default, this is set to the version of Perl\nyou run Pod::Man under. Setting this to the empty string will cause some *roff\nimplementations to use the system default value.\n\nNote that some system \"an\" macro sets assume that the centered footer will be a modification\ndate and will prepend something like \"Last modified: \". If this is the case for your target\nsystem, you may want to set \"release\" to the last modified date and \"date\" to the version\nnumber.\n\nsection\nSet the section for the \".TH\" macro. The standard section numbering convention is to use 1\nfor user commands, 2 for system calls, 3 for functions, 4 for devices, 5 for file formats, 6\nfor games, 7 for miscellaneous information, and 8 for administrator commands. There is a lot\nof variation here, however; some systems (like Solaris) use 4 for file formats, 5 for\nmiscellaneous information, and 7 for devices. Still others use 1m instead of 8, or some mix\nof both. About the only section numbers that are reliably consistent are 1, 2, and 3.\n\nBy default, section 1 will be used unless the file ends in \".pm\" in which case section 3\nwill be selected.\n\nstderr\nSend error messages about invalid POD to standard error instead of appending a POD ERRORS\nsection to the generated *roff output. This is equivalent to setting \"errors\" to \"stderr\" if\n\"errors\" is not already set. It is supported for backward compatibility.\n\nutf8\nBy default, Pod::Man produces the most conservative possible *roff output to try to ensure\nthat it will work with as many different *roff implementations as possible. Many *roff\nimplementations cannot handle non-ASCII characters, so this means all non-ASCII characters\nare converted either to a *roff escape sequence that tries to create a properly accented\ncharacter (at least for troff output) or to \"X\".\n\nIf this option is set, Pod::Man will instead output UTF-8. If your *roff implementation can\nhandle it, this is the best output format to use and avoids corruption of documents\ncontaining non-ASCII characters. However, be warned that *roff source with literal UTF-8\ncharacters is not supported by many implementations and may even result in segfaults and\nother bad behavior.\n\nBe aware that, when using this option, the input encoding of your POD source should be\nproperly declared unless it's US-ASCII. Pod::Simple will attempt to guess the encoding and\nmay be successful if it's Latin-1 or UTF-8, but it will produce warnings. Use the\n\"=encoding\" command to declare the encoding. See perlpod(1) for more information.\n\nThe standard Pod::Simple method parsefile() takes one argument naming the POD file to read\nfrom. By default, the output is sent to \"STDOUT\", but this can be changed with the outputfh()\nmethod.\n\nThe standard Pod::Simple method parsefromfile() takes up to two arguments, the first being the\ninput file to read POD from and the second being the file to write the formatted output to.\n\nYou can also call parselines() to parse an array of lines or parsestringdocument() to parse a\ndocument already in memory. As with parsefile(), parselines() and parsestringdocument()\ndefault to sending their output to \"STDOUT\" unless changed with the outputfh() method. Be aware\nthat parselines() and parsestringdocument() both expect raw bytes, not decoded characters.\n\nTo put the output from any parse method into a string instead of a file handle, call the"
                },
                {
                    "name": "output_string",
                    "content": "See Pod::Simple for more specific details on the methods available to all derived parsers.\n"
                }
            ]
        },
        "DIAGNOSTICS": {
            "content": "roff font should be 1 or 2 chars, not \"%s\"\n(F) You specified a *roff font (using \"fixed\", \"fixedbold\", etc.) that wasn't either one or\ntwo characters. Pod::Man doesn't support *roff fonts longer than two characters, although\nsome *roff extensions do (the canonical versions of nroff and troff don't either).\n\nInvalid errors setting \"%s\"\n(F) The \"errors\" parameter to the constructor was set to an unknown value.\n\nInvalid quote specification \"%s\"\n(F) The quote specification given (the \"quotes\" option to the constructor) was invalid. A\nquote specification must be either one character long or an even number (greater than one)\ncharacters long.\n\nPOD document had syntax errors\n(F) The POD document being formatted had syntax errors and the \"errors\" option was set to\n\"die\".\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "PERLCORE\nIf set and Encode is not available, silently fall back to non-UTF-8 mode without complaining\nto standard error. This environment variable is set during Perl core builds, which build\nEncode after podlators. Encode is expected to not (yet) be available in that case.\n\nPODMANDATE\nIf set, this will be used as the value of the left-hand footer unless the \"date\" option is\nexplicitly set, overriding the timestamp of the input file or the current time. This is\nprimarily useful to ensure reproducible builds of the same output file given the same source\nand Pod::Man version, even when file timestamps may not be consistent.\n\nSOURCEDATEEPOCH\nIf set, and PODMANDATE and the \"date\" options are not set, this will be used as the\nmodification time of the source file, overriding the timestamp of the input file or the\ncurrent time. It should be set to the desired time in seconds since UNIX epoch. This is\nprimarily useful to ensure reproducible builds of the same output file given the same source\nand Pod::Man version, even when file timestamps may not be consistent. See\n<https://reproducible-builds.org/specs/source-date-epoch/> for the full specification.\n\n(Arguably, according to the specification, this variable should be used only if the\ntimestamp of the input file is not available and Pod::Man uses the current time. However,\nfor reproducible builds in Debian, results were more reliable if this variable overrode the\ntimestamp of the input file.)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Encoding handling assumes that PerlIO is available and does not work properly if it isn't. The\n\"utf8\" option is therefore not supported unless Perl is built with PerlIO support.\n\nThere is currently no way to turn off the guesswork that tries to format unmarked text\nappropriately, and sometimes it isn't wanted (particularly when using POD to document something\nother than Perl). Most of the work toward fixing this has now been done, however, and all that's\nstill needed is a user interface.\n\nThe NAME section should be recognized specially and index entries emitted for everything in that\nsection. This would have to be deferred until the next section, since extraneous things in NAME\ntends to confuse various man page processors. Currently, no index entries are emitted for\nanything in NAME.\n\nPod::Man doesn't handle font names longer than two characters. Neither do most troff\nimplementations, but GNU troff does as an extension. It would be nice to support as an option\nfor those who want to use it.\n\nThe preamble added to each output file is rather verbose, and most of it is only necessary in\nthe presence of non-ASCII characters. It would ideally be nice if all of those definitions were\nonly output if needed, perhaps on the fly as the characters are used.\n\nPod::Man is excessively slow.\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "If Pod::Man is given the \"utf8\" option, the encoding of its output file handle will be forced to\nUTF-8 if possible, overriding any existing encoding. This will be done even if the file handle\nis not created by Pod::Man and was passed in from outside. This maintains consistency regardless\nof PERLUNICODE and other settings.\n\nThe handling of hyphens and em dashes is somewhat fragile, and one may get the wrong one under\nsome circumstances. This should only matter for troff output.\n\nWhen and whether to use small caps is somewhat tricky, and Pod::Man doesn't necessarily get it\nright.\n\nConverting neutral double quotes to properly matched double quotes doesn't work unless there are\nno formatting codes between the quote marks. This only matters for troff output.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Russ Allbery <rra@cpan.org>, based *very* heavily on the original pod2man by Tom Christiansen\n<tchrist@mox.perl.com>. The modifications to work with Pod::Simple instead of Pod::Parser were\noriginally contributed by Sean Burke <sburke@cpan.org> (but I've since hacked them beyond\nrecognition and all bugs are mine).\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright 1999-2010, 2012-2019 Russ Allbery <rra@cpan.org>\n\nSubstantial contributions by Sean Burke <sburke@cpan.org>.\n\nThis program is free software; you may redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Pod::Simple, perlpod(1), pod2man(1), nroff(1), troff(1), man(1), man(7)\n\nOssanna, Joseph F., and Brian W. Kernighan. \"Troff User's Manual,\" Computing Science Technical\nReport No. 54, AT&T Bell Laboratories. This is the best documentation of standard nroff and\ntroff. At the time of this writing, it's available at <http://www.troff.org/54.pdf>.\n\nThe man page documenting the man macro set may be man(5) instead of man(7) on your system. Also,\nplease see pod2man(1) for extensive documentation on writing manual pages if you've not done it\nbefore and aren't familiar with the conventions.\n\nThe current version of this module is always available from its web site at\n<https://www.eyrie.org/~eagle/software/podlators/>. It is also part of the Perl core\ndistribution as of 5.6.0.\n",
            "subsections": []
        }
    },
    "summary": "Pod::Man - Convert POD data to formatted *roff input",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "perlpod",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/perlpod/1/json"
        },
        {
            "name": "pod2man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pod2man/1/json"
        },
        {
            "name": "nroff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/nroff/1/json"
        },
        {
            "name": "troff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/troff/1/json"
        },
        {
            "name": "man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/man/1/json"
        },
        {
            "name": "man",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/man/7/json"
        },
        {
            "name": "man",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/man/5/json"
        },
        {
            "name": "man",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/man/7/json"
        },
        {
            "name": "pod2man",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pod2man/1/json"
        }
    ]
}