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:

  1. All Perl modules should be documented with POD.
  2. All Perl scripts (anything with the shebang line) should be documented with POD.
  3. 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.
  4. Each public method or subroutine should be documented, using an =item or =headN tag to identify it by name, matching the subroutine name.
  5. 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.
  6. Additional POD =headN sections can be used optionally: METHODS, NAME, SEE ALSO, PUBLIC, PRIVATE, COPYRIGHT, etc.
  7. 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.


In reply to POD Standards by ptum

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.