BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:

What's the quickest, simplest way to convert a hierarchy of pod files to suitably cross-linked and indexed html?

Yes, I've seen and tried pod2html, both the module and the command line utility, and I can't work out how to use it!*

* other than one file at a time, and I had 100+ to do.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!

Replies are listed 'Best First'.
Re: pod 2 html
by cees (Curate) on Feb 21, 2004 at 14:46 UTC

    Install Pod::Tree and use the accompanying pods2html program to convert a whole hierarchy of pod files. It even has CSS support, so you can easily pretty up your resulting HTML...

    - Cees

Re: pod 2 html
by markov (Scribe) on Feb 21, 2004 at 16:57 UTC
    You may also take a look at OODoc, which extends the syntax of pod with logical markup features. It does poduce real POD and real HTML, not HTML limited to the features of POD. OODoc manual created with OODoc.

      Thanks, but the pod in question is pre-existing, I just wanted to get it into a more easily navigable form.

Re: pod 2 html
by gmpassos (Priest) on Feb 21, 2004 at 22:16 UTC
    Take a look at Pod::HtmlEasy. With it you can convert easy to html and personalize each peace of the HTML, like links, itens, etc... without care about the convertion, entities, etc...

    Here's an example of use:

    use Pod::HtmlEasy ; my $podhtmleasy = Pod::HtmlEasy->new( on_L => sub { my ( $this , $L , $text, $page , $section, $type ) = @_ ; if ( $type eq 'pod' ) { $section = "#$section" if $section ne '' ; return "<i><a href='http://search.cpan.org/perldoc?$page +$section'>$text</a></i>" ; } elsif( $type eq 'man' ) { return "<i>$text</i>" ;} elsif( $type eq 'url' ) { return "<a href='$page' target=' +_blank'>$text</a>" ;} } , } my $html = $podhtmleasy->pod2html('test.pod' , 'test.html') ;

    Graciliano M. P.
    "Creativity is the expression of the liberty".