Posted By

noah on 08/20/09


Tagged

example perl documentation pod


Versions (?)

Perl POD embedded documentation example


 / Published in: Perl
 

URL: http://my.safaribooksonline.com/0596000278/pperl3-CHP-26-SECT-5?portal=oreilly

Start all your Perl scripts this way. Then instead of writing documentation, generate documentation automatically; from comments embedded in the code.

Steve Oualline has another nice Perl POD example

How to generate Perl POD

Use pod2html myFile.pl to generate HTML documentation (like JavaDoc, RDoc or YUIDoc).

There's also pod2latex which does just what you would think ;-)

Or just use pod2text to generate plain text documentation.

  1. #!/usr/bin/perl -w
  2. use strict;
  3.  
  4. =head1 NAME
  5.  
  6.  
  7.  
  8. =head1 SYNOPSIS
  9.  
  10.  
  11.  
  12. =head1 DESCRIPTION
  13.  
  14.  
  15. =head2 Features
  16.  
  17. =over
  18.  
  19. =item
  20.  
  21. =item
  22.  
  23. =item
  24.  
  25. =back
  26.  
  27. =cut

Report this snippet  

You need to login to post a comment.