{
    "mode": "perldoc",
    "parameter": "Pod::Simple::HTML",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Pod%3A%3ASimple%3A%3AHTML/json",
    "generated": "2026-05-30T16:08:31Z",
    "synopsis": "perl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod",
    "sections": {
        "NAME": {
            "content": "Pod::Simple::HTML - convert Pod to HTML\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "perl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is for making an HTML rendering of a Pod document.\n\nThis is a subclass of Pod::Simple::PullParser and inherits all its\nmethods (and options).\n\nNote that if you want to do a batch conversion of a lot of Pod documents\nto HTML, you should see the module Pod::Simple::HTMLBatch.\n",
            "subsections": []
        },
        "CALLING FROM THE COMMAND LINE": {
            "content": "TODO\n\nperl -MPod::Simple::HTML -e Pod::Simple::HTML::go Thing.pod Thing.html\n",
            "subsections": []
        },
        "CALLING FROM PERL": {
            "content": "",
            "subsections": [
                {
                    "name": "Minimal code",
                    "content": "use Pod::Simple::HTML;\nmy $p = Pod::Simple::HTML->new;\n$p->outputstring(\\my $html);\n$p->parsefile('path/to/Module/Name.pm');\nopen my $out, '>', 'out.html' or die \"Cannot open 'out.html': $!\\n\";\nprint $out $html;\n"
                },
                {
                    "name": "More detailed example",
                    "content": "use Pod::Simple::HTML;\n\nSet the content type:\n\n$Pod::Simple::HTML::Contentdecl =  q{<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" >};\n\nmy $p = Pod::Simple::HTML->new;\n\nInclude a single javascript source:\n\n$p->htmljavascript('http://abc.com/a.js');\n\nOr insert multiple javascript source in the header (or for that matter\ninclude anything, thought this is not recommended)\n\n$p->htmljavascript('\n<script type=\"text/javascript\" src=\"http://abc.com/b.js\"></script>\n<script type=\"text/javascript\" src=\"http://abc.com/c.js\"></script>');\n\nInclude a single css source in the header:\n\n$p->htmlcss('/style.css');\n\nor insert multiple css sources:\n\n$p->htmlcss('\n<link rel=\"stylesheet\" type=\"text/css\" title=\"podstylesheet\" href=\"http://remote.server.com/jquery.css\">\n<link rel=\"stylesheet\" type=\"text/css\" title=\"podstylesheet\" href=\"/style.css\">');\n\nTell the parser where should the output go. In this case it will be\nplaced in the $html variable:\n\nmy $html;\n$p->outputstring(\\$html);\n\nParse and process a file with pod in it:\n\n$p->parsefile('path/to/Module/Name.pm');\n"
                }
            ]
        },
        "METHODS": {
            "content": "TODO all (most?) accessorized methods\n\nThe following variables need to be set before the call to the ->new\nconstructor.\n\nSet the string that is included before the opening <html> tag:\n\n$Pod::Simple::HTML::Doctypedecl = qq{<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\\n};\n\nSet the content-type in the HTML head: (defaults to ISO-8859-1)\n\n$Pod::Simple::HTML::Contentdecl =  q{<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" >};\n\nSet the value that will be embedded in the opening tags of F, C tags and\nverbatim text. F maps to <em>, C maps to <code>, Verbatim text maps to\n<pre> (Computerese defaults to \"\")\n\n$Pod::Simple::HTML::Computerese =  ' class=\"someclassname';\n\nhtmlcss\nhtmljavascript\ntitleprefix\ntitlepostfix\nhtmlheaderbeforetitle\nThis includes everything before the <title> opening tag including the\nDocument type and including the opening <title> tag. The following call\nwill set it to be a simple HTML file:\n\n$p->htmlheaderbeforetitle('<html><head><title>');\n\ntopanchor\nBy default Pod::Simple::HTML adds a dummy anchor at the top of the HTML.\nYou can change it by calling\n\n$p->topanchor('<a name=\"zz\" >');\n\nhtmlhlevel\nNormally =head1 will become <h1>, =head2 will become <h2> etc. Using the\nhtmlhlevel method will change these levels setting the h level of\n=head1 tags:\n\n$p->htmlhlevel(3);\n\nWill make sure that =head1 will become <h3> and =head2 will become <h4>\netc...\n\nindex\nSet it to some true value if you want to have an index (in reality a\ntable of contents) to be added at the top of the generated HTML.\n\n$p->index(1);\n\nhtmlheaderaftertitle\nIncludes the closing tag of </title> and through the rest of the head\ntill the opening of the body\n\n$p->htmlheaderaftertitle('</title>...</head><body id=\"myid\">');\n\nhtmlfooter\nThe very end of the document:\n\n$p->htmlfooter( qq[\\n<!-- end doc -->\\n\\n</body></html>\\n] );\n",
            "subsections": []
        },
        "SUBCLASSING": {
            "content": "Can use any of the methods described above but for further customization\none needs to override some of the methods:\n\npackage My::Pod;\nuse strict;\nuse warnings;\n\nuse base 'Pod::Simple::HTML';\n\n# needs to return a URL string such\n# http://some.other.com/page.html\n# #anchorinthesamefile\n# /internal/ref.html\nsub dopodlink {\n# My::Pod object and Pod::Simple::PullParserStartToken object\nmy ($self, $link) = @;\n\nsay $link->tagname;          # will be L for links\nsay $link->attr('to');       #\nsay $link->attr('type');     # will be 'pod' always\nsay $link->attr('section');\n\n# Links local to our web site\nif ($link->tagname eq 'L' and $link->attr('type') eq 'pod') {\nmy $to = $link->attr('to');\nif ($to =~ /^Padre::/) {\n$to =~ s{::}{/}g;\nreturn \"/docs/Padre/$to.html\";\n}\n}\n\n# all other links are generated by the parent class\nmy $ret = $self->SUPER::dopodlink($link);\nreturn $ret;\n}\n\n1;\n\nMeanwhile in script.pl:\n\nuse My::Pod;\n\nmy $p = My::Pod->new;\n\nmy $html;\n$p->outputstring(\\$html);\n$p->parsefile('path/to/Module/Name.pm');\nopen my $out, '>', 'out.html' or die;\nprint $out $html;\n\nTODO\n\nmaybe override dobeginning doend\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Pod::Simple, Pod::Simple::HTMLBatch\n\nTODO: a corpus of sample Pod input and HTML output? Or common idioms?\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Questions or discussion about POD and Pod::Simple should be sent to the\npod-people@perl.org mail list. Send an empty email to\npod-people-subscribe@perl.org to subscribe.\n\nThis module is managed in an open GitHub repository,\n<https://github.com/perl-pod/pod-simple/>. Feel free to fork and\ncontribute, or to clone <git://github.com/perl-pod/pod-simple.git> and\nsend patches!\n\nPatches against Pod::Simple are welcome. Please send bug reports to\n<bug-pod-simple@rt.cpan.org>.\n",
            "subsections": []
        },
        "COPYRIGHT AND DISCLAIMERS": {
            "content": "Copyright (c) 2002-2004 Sean M. Burke.\n\nThis library is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n\nThis program is distributed in the hope that it will be useful, but\nwithout any warranty; without even the implied warranty of\nmerchantability or fitness for a particular purpose.\n",
            "subsections": []
        },
        "ACKNOWLEDGEMENTS": {
            "content": "Thanks to Hurricane Electric <http://he.net/> for permission to use its\nLinux man pages online <http://man.he.net/> site for man page links.\n\nThanks to search.cpan.org <http://search.cpan.org/> for permission to\nuse the site for Perl module links.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't\nbother him, he's retired.\n\nPod::Simple is maintained by:\n\n*   Allison Randal \"allison@perl.org\"\n\n*   Hans Dieter Pearcey \"hdp@cpan.org\"\n\n*   David E. Wheeler \"dwheeler@cpan.org\"\n",
            "subsections": []
        }
    },
    "summary": "Pod::Simple::HTML - convert Pod to HTML",
    "flags": [],
    "examples": [],
    "see_also": []
}