{
    "content": [
        {
            "type": "text",
            "text": "# Pod::Simple::HTML (perldoc)\n\n**Summary:** Pod::Simple::HTML - convert Pod to HTML\n\n**Synopsis:** perl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (8 lines)\n- **CALLING FROM THE COMMAND LINE** (4 lines)\n- **CALLING FROM PERL** (1 lines) — 2 subsections\n  - Minimal code (7 lines)\n  - More detailed example (39 lines)\n- **METHODS** (64 lines)\n- **SUBCLASSING** (54 lines)\n- **SEE ALSO** (4 lines)\n- **SUPPORT** (12 lines)\n- **COPYRIGHT AND DISCLAIMERS** (9 lines)\n- **ACKNOWLEDGEMENTS** (6 lines)\n- **AUTHOR** (11 lines)\n\n## Full Content\n\n### NAME\n\nPod::Simple::HTML - convert Pod to HTML\n\n### SYNOPSIS\n\nperl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod\n\n### DESCRIPTION\n\nThis 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\n### CALLING FROM THE COMMAND LINE\n\nTODO\n\nperl -MPod::Simple::HTML -e Pod::Simple::HTML::go Thing.pod Thing.html\n\n### CALLING FROM PERL\n\n#### Minimal code\n\nuse 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\n#### More detailed example\n\nuse 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\n### METHODS\n\nTODO 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\n### SUBCLASSING\n\nCan 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\n### SEE ALSO\n\nPod::Simple, Pod::Simple::HTMLBatch\n\nTODO: a corpus of sample Pod input and HTML output? Or common idioms?\n\n### SUPPORT\n\nQuestions 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\n### COPYRIGHT AND DISCLAIMERS\n\nCopyright (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\n### ACKNOWLEDGEMENTS\n\nThanks 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\n### AUTHOR\n\nPod::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\n"
        }
    ],
    "structuredContent": {
        "command": "Pod::Simple::HTML",
        "section": "",
        "mode": "perldoc",
        "summary": "Pod::Simple::HTML - convert Pod to HTML",
        "synopsis": "perl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "CALLING FROM THE COMMAND LINE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CALLING FROM PERL",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Minimal code",
                        "lines": 7
                    },
                    {
                        "name": "More detailed example",
                        "lines": 39
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 64,
                "subsections": []
            },
            {
                "name": "SUBCLASSING",
                "lines": 54,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND DISCLAIMERS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 11,
                "subsections": []
            }
        ]
    }
}