views:

262

answers:

4

I was able to find a page from Safari Books Online that provides a template, but having never written POD comments, I'm not sure how good it is or if it is missing anything that might be considered convention to include.

What are the conventions to follow when writing POD comments for Perl scripts? Is there anything like Sun's Javadoc Conventions, but for POD comments?

+4  A: 

There are a set of recommendations in Perl Best Practices. The whole of Chapter 7 covers documentation, using POD, and the best approaches to documentation for modules, large projects etc. It also talks about CPAN conventions. That's probably your best bet.

ire_and_curses
Do you know if any of this is freely available online? I like the book suggestion (especially since it looks very complete and in-depth), but something freely available to get me started would be best.
Thomas Owens
@Thomas Owens: I don't think any of the book content is freely available online. Sinan's link to Perl::Critic is a good one. Another option is to take a look at the documentation for some of the core CPAN modules. Although the approaches can vary somewhat, there are standard sections etc. which are helpful as guidelines.
ire_and_curses
+3  A: 

Perl::Critic provides the following policies:

A list of required sections is provided by the last policy above.

Module::Starter::PBP will generate the boilerplate code for you.

Sinan Ünür
The "Hints for Writing Pod" aren't about content. I should probably edit my question to be more clear, but I'm specifically looking for content and design (sectioning, heading, indentation...) conventions. I am looking at the RequirePodSections to modify the template I looked at to try to improve it.
Thomas Owens
Yes, +1 for the default required sections part of the RequirePodSections document. I'm using that to modify the original template I linked to. I think I've got something that's decent, which is better than what I started with.
Thomas Owens
+5  A: 

It's not elaborate, but I like Juerd's perlpodtut introduction a lot.

The author mentions what he considers common sections and what they would include.

Telemachus
A: 

You can look at the Pod for the Perl modules on CPAN Search and quickly note the things that everyone does. The various module starting tools make boilerplate for you.

That's about as close as you'll get to guidelines.

brian d foy