Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. POD > The POD Template

The POD Template

A POD document has many sections, and remembering them all can be difficult. The technique I use is to start with a template, fill in the sections I need, delete the sections I don’t, and thus get good documentation: (This template is rather long. Cut it down and only use the sections which are relevant to your situation.)

=pod 

=head1 NAME 

program – a program that does something useful 

=head1 SYNOPSIS 

    program [–x] [–x=<value>] <file> [<file> ...] 

=head1 DESCRIPTION 

The I<program> does something very useful. 

=head1 OPTIONS 

The I<program> takes the following arguments: 

=over 4 

=item B<–x> 

An option that's just a single letter. 

=item B<–x=>I<value> 

An option that takes a I<value> as an argument. 

=back 

=head1 RETURN VALUE 
Exit values are: 

=over 4 

=item 0 

Success. 

=item 1 

Failure 

=item 8 

Bad failure. 

=back 

=head1 EXAMPLES 

An example of how to use the program to do something is: 

        program –x –x=foo in_file.txt 

=head1 WARNINGS 

Just because you're paranoid it doesn't mean that they aren't out 
to get you. 

=head1 DIAGNOSTICS 

Most of the error messages are self explanatory. 

=head1 ENVIRONMENT 

=over 4 

=item I<ENV> 

An environment variable that affects the program. 

=back 

=head1 FILES 

=over 4 

=item /tmp/foo.lock 

A lock file used to make sure that we don't try and update 
the database from two programs at the same time. 
=back 

=head1 AUTHOR 

A. Writer, E<lt>a.writer@localhostE<gt>. 

=head1 BUGS 

The command I<program> does not exist. 

=head1 SEE ALSO 

L<another_program>, L<yanp> 

=head1 COPYRIGHT 

Copyright 2001, by Someone at Some Company. 

=cut

					  


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint