I've recently embarked on a quest to bring the POD (Plain 'Ole Documentation) in our shop up to some level of measurable quality (or at least density/quantity). I half-heartedly googled around and did a Super Search here at PM but didn't come up with much in the way of a standardized way to do POD. So I decided to write my own rules. Here's a first draft:
- All Perl modules should be documented with POD.
- All Perl scripts (anything with the shebang line) should be documented with POD.
- All POD documentation should include, at a minimum, the following =head1 sections:
- DESCRIPTION -- This should be a paragraph or two about the purpose(s) for the module/script and a high-level narrative about what it does and how it works.
- SYNOPSIS -- This should be an example as to how one would use a module or call a script.
- if the script is intended to be directly executed, it should also include a =head2 section for PARAMETERS, outlining each argument or parameter which can be passed to the script
- AUTHOR -- This should include at least the last name of the person who 'owns' or wrote the script or module.
- Each public method or subroutine should be documented, using an =item or =headN tag to identify it by name, matching the subroutine name.
- Private methods or subroutines can be commented rather than POD-ed, but their names should follow the leading underscore convention so they can be easily excluded from any coverage calculations.
- Additional POD =headN sections can be used optionally: METHODS, NAME, SEE ALSO, PUBLIC, PRIVATE, COPYRIGHT, etc.
- All POD should pass podchecker (POD::Checker) with no errors
I've rolled my own customized substitute for POD::Coverage to profile our codebase documentation; it depends on (or at least expects) our code POD to adhere to these standards. So far it is being well-received by the other developers, although they may just be humoring me. :)
This seems to be an area where a little structure may go a long way ... I've tried to keep the standard pretty minimal to avoid makework. Recommendations welcome.