V
39  

del.icio.us icon Bookmark this page

Edit the sidebar

Tags
Attachments
Perl 5 Wiki
POD

Plain Old Documentation format, or POD is Perl's own embedded documentation format.



Advantages

  • Embedded documentation cannot be lost
  • Can be translated into many different formats
  • Can be embedded, as a comment, in other programming languages than Perl.

Disadvantages

  • POD is not a complete formatting language and many things cannot easily be expressed, such as embedded images, tables and two-column layout.

Viewers

Command Line

Replacement for perldoc that integrates the comments from AnnoCPAN into the documentation.

Local Web Interfaces

Simple, yet sufficient for many uses.

Lots of features.

Formatters

POD can be formatted in many different ways. Here is a list of formats and their translators...

A handy switch to use on the command-line is -css=/path/to/my/css.file, which goes a long way to making the output look much better than default unadorned HTML.

A couple of handy switches on the command-line are -l -i2 -w72 (loose: blank line after H1's, indent of 2 and wrap at column 72).

Verification

Command Line

There are various tools to check the validity of your POD syntax, spelling and other issues.

usage: podchecker --warnings [filename]

Here is a simple shell script that may be used to list possibly misspelled words:

perl {{-MPod::Spell -e}} "Pod::Spell->new->parse_from_file(shift)" $1 \
    | ispell -l -p ~/my.dict -B \
    | sort -u

(where ~/my.dict contains a local dictionary of words)

Automated Testing

Tools

Various tools for working with POD

  • search.cpan.org preview

Many people measure the correctness of their POD formatting by what the results look like on search.cpan.org. Unfortunately, if you make a mistake, you have to upload a new distribution. Fortunately, you can test your POD before uploading a distribution to CPAN.

Authors may use the POD previewer on search.cpan.org. You just browse locally for your file and upload it. The POD is then formatted and remdered by the site's custom formatting, which allows you to tweak your POD endlessly before the official release.

Documentation

Alternatives to POD

  • Pod::WikiDoc allows one to embed wiki-style documentation in a POD format block, then extract and convert it to ordinary POD for distribution. (See Write More With Less from the YAPC::NA 2006 Lightning Talks.)
  • OODoc this module simplifies writing documentation for Object Oriented programs
  • Natural Docs an open-source, extensible, multi-language documentation generator. You document your code in a natural syntax that reads like plain English. Natural Docs then scans your code and builds high-quality HTML documentation from it.

Mailing lists

Useful resources

Web design agency


 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: