See Pod::HtmlEasy. By dafault it converts in a look like CPAN.
Graciliano M. P.
"Creativity is the expression of the liberty".
| [reply] |
#!/usr/bin/perl
use strict; use warnings;
use Pod::HtmlEasy;
my $pod_file = shift or die "Specify POD file as argument";
my $podhtml = Pod::HtmlEasy->new();
my $html = $podhtml->pod2html( $pod_file);
print $html;
Then I can do this to generate CPAN like pod and proof read it:
./tohml.pl MyModule.pm > out.html
| [reply] [d/l] |
Pod::HtmlEasy already comes with
scripts/podhtmleasy.pl
scripts/debug.pl
scripts/pod2indexed_html.pl
scripts/podhtmleasy.sh
But then there is pod2cpanhtml/App::Pod2CpanHtml | [reply] [d/l] |
Apache::Pod::HTML
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] |
Install Pod::Tree and use the accompanying pods2html program to convert a whole hierarchy of pod files to HTML with CSS support all in one go. Then copy the styles from CPAN and your all set.
- Cees
| [reply] |
If you want more flexibility and you know how to use the Template Toolkit (tt2), then you can use the tt2 Pod::POM (Pod Object Model) plugin and tt2 views to parse a POD document and generate HTML for each POD section in it using some templates (e.g., a head2.html template for =head2 sections, a verbatim.html template for verbatim paragraphs, which could surround its contet with a big grey table like search.cpan does). I mention this trick because out of all of the alternatives, I've found it to be the easiest and most powerful.
I'm not entirely sure how it works, but you see, that's OK, because all I had to do was create a few of templates in the vein of these, have one main template (which I copied from the tt2 documentation souce) with a view in it to call the others, and with a little work I had heavily customized HTML generated from POD. No mucking around with POD::Parser and handlers and state variables, I just wrote the HTML and CSS and let tt2 and Pod::POM do the rest.
| [reply] |