, Verbatim text maps to (Computerese defaults to "")
.PP
.Vb 1
\& $Pod::Simple::HTML::Computerese = \*(Aq class="some_class_name\*(Aq;
.Ve
.SS html_css
.IX Subsection "html_css"
.SS html_javascript
.IX Subsection "html_javascript"
.SS title_prefix
.IX Subsection "title_prefix"
.SS title_postfix
.IX Subsection "title_postfix"
.SS html_header_before_title
.IX Subsection "html_header_before_title"
This includes everything before the opening tag including the Document type
and including the opening tag. The following call will set it to be a simple HTML
file:
.PP
.Vb 1
\& $p\->html_header_before_title(\*(Aq\*(Aq);
.Ve
.SS top_anchor
.IX Subsection "top_anchor"
By default Pod::Simple::HTML adds a dummy anchor at the top of the HTML.
You can change it by calling
.PP
.Vb 1
\& $p\->top_anchor(\*(Aq\*(Aq);
.Ve
.SS html_h_level
.IX Subsection "html_h_level"
Normally =head1 will become , =head2 will become etc.
Using the html_h_level method will change these levels setting the h level
of =head1 tags:
.PP
.Vb 1
\& $p\->html_h_level(3);
.Ve
.PP
Will make sure that =head1 will become and =head2 will become etc...
.SS index
.IX Subsection "index"
Set it to some true value if you want to have an index (in reality a table of contents)
to be added at the top of the generated HTML.
.PP
.Vb 1
\& $p\->index(1);
.Ve
.SS html_header_after_title
.IX Subsection "html_header_after_title"
Includes the closing tag of
and through the rest of the head
till the opening of the body
.PP
.Vb 1
\& $p\->html_header_after_title(\*(Aq...\*(Aq);
.Ve
.SS html_footer
.IX Subsection "html_footer"
The very end of the document:
.PP
.Vb 1
\& $p\->html_footer( qq[\en\en\en\en] );
.Ve
.SH SUBCLASSING
.IX Header "SUBCLASSING"
Can use any of the methods described above but for further customization
one needs to override some of the methods:
.PP
.Vb 3
\& package My::Pod;
\& use strict;
\& use warnings;
\&
\& use base \*(AqPod::Simple::HTML\*(Aq;
\&
\& # needs to return a URL string such
\& # http://some.other.com/page.html
\& # #anchor_in_the_same_file
\& # /internal/ref.html
\& sub do_pod_link {
\& # My::Pod object and Pod::Simple::PullParserStartToken object
\& my ($self, $link) = @_;
\&
\& say $link\->tagname; # will be L for links
\& say $link\->attr(\*(Aqto\*(Aq); #
\& say $link\->attr(\*(Aqtype\*(Aq); # will be \*(Aqpod\*(Aq always
\& say $link\->attr(\*(Aqsection\*(Aq);
\&
\& # Links local to our web site
\& if ($link\->tagname eq \*(AqL\*(Aq and $link\->attr(\*(Aqtype\*(Aq) eq \*(Aqpod\*(Aq) {
\& my $to = $link\->attr(\*(Aqto\*(Aq);
\& if ($to =~ /^Padre::/) {
\& $to =~ s{::}{/}g;
\& return "/docs/Padre/$to.html";
\& }
\& }
\&
\& # all other links are generated by the parent class
\& my $ret = $self\->SUPER::do_pod_link($link);
\& return $ret;
\& }
\&
\& 1;
.Ve
.PP
Meanwhile in script.pl:
.PP
.Vb 1
\& use My::Pod;
\&
\& my $p = My::Pod\->new;
\&
\& my $html;
\& $p\->output_string(\e$html);
\& $p\->parse_file(\*(Aqpath/to/Module/Name.pm\*(Aq);
\& open my $out, \*(Aq>\*(Aq, \*(Aqout.html\*(Aq or die;
\& print $out $html;
.Ve
.PP
TODO
.PP
maybe override do_beginning do_end
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Pod::Simple, Pod::Simple::HTMLBatch
.PP
TODO: a corpus of sample Pod input and HTML output? Or common
idioms?
.SH SUPPORT
.IX Header "SUPPORT"
Questions or discussion about POD and Pod::Simple should be sent to the
pod\-people@perl.org mail list. Send an empty email to
pod\-people\-subscribe@perl.org to subscribe.
.PP
This module is managed in an open GitHub repository,
. Feel free to fork and contribute, or
to clone and send patches!
.PP
Patches against Pod::Simple are welcome. Please send bug reports to
.
.SH "COPYRIGHT AND DISCLAIMERS"
.IX Header "COPYRIGHT AND DISCLAIMERS"
Copyright (c) 2002\-2004 Sean M. Burke.
.PP
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
.PP
This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
.SH ACKNOWLEDGEMENTS
.IX Header "ACKNOWLEDGEMENTS"
Thanks to Hurricane Electric for permission to use its
Linux man pages online site for man page links.
.PP
Thanks to search.cpan.org for permission to use the
site for Perl module links.
.SH AUTHOR
.IX Header "AUTHOR"
Pod::Simple was created by Sean M. Burke .
But don't bother him, he's retired.
.PP
Pod::Simple is maintained by:
.IP \(bu 4
Allison Randal \f(CW\*(C`allison@perl.org\*(C'\fR
.IP \(bu 4
Hans Dieter Pearcey \f(CW\*(C`hdp@cpan.org\*(C'\fR
.IP \(bu 4
David E. Wheeler \f(CW\*(C`dwheeler@cpan.org\*(C'\fR