in reply to pod2html - How do I make mine look like CPAN?

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.

  • Comment on Re: pod2html - How do I make mine look like CPAN?