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

Greetings honorable Monks,

I have finaly found some time to figure out how to write POD files. To my dismay it was too easy even for a perlish "easy things must be easy". Anyway, I want to see how a POD looks like if, God forbid, I upload it to CPAN. However when I run pod2html I get a completely different markup than the nice one I am used to seeing on CPAN. Where can I find more about the toolchain/options that produce all the html for CPAN?

Replies are listed 'Best First'.
Re: pod2html question
by jmcnamara (Monsignor) on Jan 22, 2007 at 09:14 UTC
    As far as I know search.cpan.org uses Pod::Simple::HTML (or a variation of it) to produce the Html. After that most of the formatting is done via CSS and this stylesheet.

    --
    John.

Re: pod2html question
by Anonymous Monk on Jan 22, 2007 at 03:08 UTC
Re: pod2html question
by jmcnamara (Monsignor) on Jan 23, 2007 at 12:13 UTC

    Here is a small filter program based on Pod::Simple::HTML and the search.cpan CSS that should give you more or less the same output that you see on that site:
    #!/usr/bin/perl -w use strict; use Pod::Simple::HTML; my $parser = Pod::Simple::HTML->new(); if (defined $ARGV[0]) { open IN, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n"; } else { *IN = *STDIN; } if (defined $ARGV[1]) { open OUT, ">$ARGV[1]" or die "Couldn't open $ARGV[1]: $!\n"; } else { *OUT = *STDOUT; } $parser->index(1); $parser->html_css('http://search.cpan.org/s/style.css'); $parser->output_fh(*OUT); $parser->parse_file(*IN); __END__

    Update: This utility is now available on CPAN as pod2cpanhtml which is install as part of App::Pod2CpanHtml.

    --
    John.

Online pod2html pod checker
by james2vegas (Chaplain) on Sep 10, 2010 at 01:14 UTC