Difference between revisions of "POD"

From Dreamwidth Notes
Jump to: navigation, search
(Created page with "POD stands for Plain Old Documentation format, and we're trying to standardize on all DW code being documented in this fashion. There is [http://perldoc.perl.org/perlpod.html re...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
POD stands for Plain Old Documentation format, and we're trying to standardize on all DW code being documented in this fashion.
 
POD stands for Plain Old Documentation format, and we're trying to standardize on all DW code being documented in this fashion.
  
There is [http://perldoc.perl.org/perlpod.html read documentation about the format].
+
There is [http://perldoc.perl.org/perlpod.html basic documentation about the format].
  
 
Examples of code files documented this way already:
 
Examples of code files documented this way already:
Line 7: Line 7:
 
  cgi-bin/DW/InviteCodes.pm
 
  cgi-bin/DW/InviteCodes.pm
 
  cgi-bin/DW/Shop/Item/Rename.pm
 
  cgi-bin/DW/Shop/Item/Rename.pm
 +
 +
== Examples ==
 +
 +
=== Function with named and optional arguments ===
 +
 +
<syntaxhighlight lang="perl">=head2 C<< $class->check_code( code => $invite [, userid => $recipient] ) >>
 +
 +
Checks whether code $invite is valid before trying to create an account. Takes
 +
an optional $recipient userid, to protect the code from accidentally being used
 +
if the form is double-submitted.
 +
 +
=cut</syntaxhighlight>
  
 
[[Category: Development]]
 
[[Category: Development]]

Latest revision as of 22:09, 3 March 2011

POD stands for Plain Old Documentation format, and we're trying to standardize on all DW code being documented in this fashion.

There is basic documentation about the format.

Examples of code files documented this way already:

cgi-bin/DW/InviteCodes.pm
cgi-bin/DW/Shop/Item/Rename.pm

Examples

Function with named and optional arguments

=head2 C<< $class->check_code( code => $invite [, userid => $recipient] ) >>
 
Checks whether code $invite is valid before trying to create an account. Takes
an optional $recipient userid, to protect the code from accidentally being used
if the form is double-submitted.
 
=cut