[Canberra-pm] Podding around

Jacinta Richardson jarich at perltraining.com.au
Tue Jul 29 17:11:09 PDT 2008


Paul Matthews wrote:

> If the below is compiled with pod2text it looks cool. With pod2html all
> the =head1's with the exception of the first are not generated at all.
> Any hints would be appreciated. (Code removed and names changed to
> protect the guilty.)

Are you sure?  I get the following.  Using Pod::Html 1.0504.

...
<h1><a name="name">NAME</a></h1>
<p>dbs.pm</p>
<p>
</p>
<h2><a name="description">DESCRIPTION</a></h2>
<p>Objects holding the information and structure of the databases.</p>
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>dbbase</p>
<p>
</p>
<h2><a name="description">DESCRIPTION</a></h2>
<p>Base class of all db objects. This class should never be directly
instantiated.</p>
<p>
</p>
....

That has 2 h1s in it.

One hint.  When you provide code examples in POD, indent them by at least one
space character.  This means POD will know what to do with them and pod2html
won't wrap them in a paragraph block.

We cover writing POD in one of our Perl Tips:
http://perltraining.com.au/tips/2005-04-06.html

We actually write our tips in POD and then convert them to our email text using
pod2txt -a, and pod2html.  I usually do a little tidying up after pod2html
though, because I don't want links to each heading etc.

All the best,

	Jacinta

-- 
   ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
    `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
    (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
  _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
 (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |


More information about the Canberra-pm mailing list