{
    "content": [
        {
            "type": "text",
            "text": "# Pod::Simple::HTML (perldoc)\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\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CALLING FROM THE COMMAND LINE**\n- **CALLING FROM PERL** (2 subsections)\n- **METHODS**\n- **SUBCLASSING**\n- **SEE ALSO**\n- **SUPPORT**\n- **COPYRIGHT AND DISCLAIMERS**\n- **ACKNOWLEDGEMENTS**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\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",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "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": 59,
                "subsections": []
            },
            {
                "name": "SUBCLASSING",
                "lines": 54,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND DISCLAIMERS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 10,
                "subsections": []
            }
        ],
        "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 methods (and options).\n\nNote that if you want to do a batch conversion of a lot of Pod documents to HTML, you should see\nthe 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 include anything, thought\nthis 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 placed in the $html\nvariable:\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 constructor.\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 verbatim text. F maps\nto <em>, C maps to <code>, Verbatim text maps to <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 Document type and\nincluding the opening <title> tag. The following call will 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. You can change it by\ncalling\n\n$p->topanchor('<a name=\"zz\" >');\n\nhtmlhlevel\nNormally =head1 will become <h1>, =head2 will become <h2> etc. Using the htmlhlevel method\nwill change these levels setting the h level of =head1 tags:\n\n$p->htmlhlevel(3);\n\nWill make sure that =head1 will become <h3> and =head2 will become <h4> etc...\n\nindex\nSet it to some true value if you want to have an index (in reality a table of contents) to be\nadded 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 till the opening of the\nbody\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 one needs to override\nsome 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 pod-people@perl.org mail\nlist. Send an empty email to pod-people-subscribe@perl.org to subscribe.\n\nThis module is managed in an open GitHub repository, <https://github.com/perl-pod/pod-simple/>.\nFeel free to fork and contribute, 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 under the same terms as\nPerl itself.\n\nThis program is distributed in the hope that it will be useful, but without any warranty;\nwithout even the implied warranty of merchantability or fitness for a particular purpose.\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "Thanks to Hurricane Electric <http://he.net/> for permission to use its Linux man pages online\n<http://man.he.net/> site for man page links.\n\nThanks to search.cpan.org <http://search.cpan.org/> for permission to use the site for Perl\nmodule links.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Pod::Simple was created by Sean M. Burke <sburke@cpan.org>. But don't bother 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": []
            }
        }
    }
}