The other fella have pointed you to the meat of the subject (perlpod and perlpodspec), and I'd like to point you to Pod::Tree (watchout for pod2html being overwritten, edit the makefile and don't install any of the scripts, they're interdependent, and will install the missing ones) and Pod::Html (fyi: i like Pod::Simple very much, as well as ActivePerl::DocTools).

Nobody reads pod in pod format.

Pod is best kept with the sourcecode, that way synchronization doesn't become a problem. If the pod is staring you in the face, at the same time as the sourcecode, it's hard to ignore mismatches ;)

Any stuff you put in external pod files (.pod) should be tutorial like material (extended documentation) ~ the api spec should be in with the module (.pm )

Aside from that, don't get fancy with the pod (avoid =begin exoticFormat , bah!). Keep it simple.

Here are a few modules with pod that I wrote ;)

HTML::LinkExtractor ~ a good pod example. I most like to read pod produced by Pod::Html, cause it makes a nice TOC at the top (like you can see there).

If you look at the source, you'll see that the pod is at the __END__. Since this was a very short module, it makes little difference, but for bigger modules, it will definetly be harder to manage __END__ pod, so you'll wanna use inline pod , like:


=head1 NAME

The name Is ~ And it does this in one line of desc

=head1 DESCRIPTION

You know.
See L<"new"> aka See L<the newest|"new">

=head1 SYNOPSIS

a short usage example (at least I like to keep it short)

    use Foo::Bar;
    my $foo = new Foo::Bar ( Foo => 'required' );
    die $foo->Bar;


=head1 METHODS (or Functions ;))

A little blurb about the methods/functions or the overall
interface of the thingamajigger ;)

=cut


use strict;

...

=head2 C<new>

The constructor.  The only class method. Takes 4 arguments.

=over 4

=item Foo

Required argument, cause Bar bar bar Baz!

...

=back

=cut

sub new {
  ...
}

...

1;
# the end of the code
# I try not to put an __END__ token here cause mod_perl
# generally doesn't like that

=head1 SEE ALSO

L<Foo::Bar::Tutorial>, L<perlpod|Pod::perlpod>, L<perlpodspec|Pod::perlpodspec>

=head1 LICENSE

This software is released under the same terms as perl itself.
If you don't know what that means visit http://perl.com/

=head1 AUTHOR

Copyright (c) A. U. Thor 
All rights Reserved

=cut
Which when viewed through Pod::Html turns into:

NAME

The name Is ~ And it does this in one line of desc


DESCRIPTION

You know. See new aka See the newest


SYNOPSIS

a short usage example (at least I like to keep it short)

    use Foo::Bar;
    my $foo = new Foo::Bar ( Foo => 'required' );
    die $foo->Bar;


METHODS (or Functions ;))

A little blurb about the methods/functions or the overall interface of the thingamajigger ;)

new

The constructor. The only class method. Takes 4 arguments.

Foo
Required argument, cause Bar bar bar Baz!

...


SEE ALSO

the Foo::Bar::Tutorial manpage, perlpod, perlpodspec


LICENSE

This software is released under the same terms as perl itself. If you don't know what that means visit http://perl.com/


AUTHOR

Copyright (c) A. U. Thor All rights Reserved


 

Now that is gravy right there ;)(that's the way i'd lay it out). It is important to remember not to document methods that the user of your module should not be calling directly. Use #c#o#m#m#e#n#t#s# for those.

Pod::Stripper ~ a bad example, mostly cause they're test cases ;)(deep pod voodoo, cause perl's idea of pod is different ~ perlpod/perlsyn explains)

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Crash Course in POD by PodMaster
in thread Crash Course in POD by jens

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.