POD
Plain Ol' Documentation
Inline documentation & formatting
POD allows you to create documentation with markup in your Perl code.If you've seen Javadoc or PHPdoc,it's like that.Rather,Javadoc and PHPdoc are like POD.
Except that POD is part of the language,not an add-on spec.
Create headings with =head1 and =head2
- =head1 MOST IMPORTANT
- Blah blah
- =head2 Subheading
- blah blah
- =head2 Subhading
- blah blah
Create unordered lists
To create this list:
- Wango
- Tango
- Fandango
Use
- =over
- =item * Wango
- =item * Tango
- =item * Fandango
- =back
Create ordered lists
To create this list:
- 1 Visit perl101.org
- 2 ???
- 3 Profit!
Use
- =over
- =item 1 Visit perl101.org
- =item 2 ???
- =item 3 Profit!
- =back
Use inline markup styles
POD uses B<>, I<> and C<> for bold, italics and code
, respectively.
- B<This is bolded>
- I<This is italics>
- C<This is code>
Your markup formats can nest.
Link with L<>
The L<>
links either to keywords in your document, as in L<Methods>
, or to a specific URL, as in L<http://search.cpan.org>
.
Paragraph mode vs. literal blocks
Everything in a paragraph word-wraps automatically. A paragraph is separated by at least one blank line.
- A literal block is indented at least one space
- and does not
- get
- wrapped.
This came from:
- Everything in a paragraph word-wraps automatically. A paragraph
- is separated by at least one blank line.
- A literal block is indented at least one space
- and does not
- get
- wrapped.
POD does not make anything run slower.
It's stripped out at compile time.
TODO
Talk about double-bracketing
Want to contribute?
Submit a PR to github.com/petdance/perl101