Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
127 lines (69 sloc) 1.88 KB

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.

This is bolded

This is italics

This is code

Your markup formats can nest.

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