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

Hi!

I'd like to create HTML documentation from a Perl module with POD in the "CPAN style" or similar. pod2html creates only black on white. Even with "pod2html --css style.css" (style.css from cpan.org) the result is not very nice.

Another question: I noticed, that POD is very limited to create documentation if you want to document a Perl Module with more than one package/class in it:

If you use "=head3 new" to document constructors and there are more than one, the HTML file which pod2html generates has problems with links. There are more than one <a name="new"> in it and you have to use "=head3 Class::new" or similar.

Is there a better POD to HTML parser than pod2html or is there a better code documenting system for Perl than POD?

Thanks,
Thomas

Replies are listed 'Best First'.
Re: POD questions
by Juerd (Abbot) on Apr 06, 2003 at 18:37 UTC
Re: POD questions
by The Mad Hatter (Priest) on Apr 06, 2003 at 18:40 UTC
    I believe CPAN uses a custom pod2html generator or something similar. If you manually tweak the output of pod2html --css style.css to put the body text in class pod and the table of contents in class toc it should turn out better. You could also tweak the CSS instead if you wanted to.

    For some reason, pod2html uses multiple pre tags for code examples, which causes it to look funny using the CPAN styles. If you make the code sections wrapped in only one pre tag, it should look like it does on CPAN.

    Hope this helps.

Re: POD questions
by omnibus (Scribe) on Apr 07, 2003 at 15:27 UTC

    Pdoc (available from SourceForge, not from CPAN) might be just what you're looking for. It uses standard POD markup to generate Javadoc-like documentation pages.

    Take a look at the BioPerl documentation at http://doc.bioperl.org/releases/bioperl-1.2/ for an example of the output that it generates.