Perl has this really cool documentation method that makes documenting really easy. It's called POD (Plain Old Documentation). Here is an example:

=head1 NAME

Example::Module - an example


    use Example::Module;
    my $object = Example::Module->new();
    print $object->as_string;


Just an example.

=head2 Methods

=over 12

=item C<new>

Returns a new My::Module object.

=item C<as_string>

Returns a stringified representation of
the object. This is mainly for debugging


=head1 LICENSE

This is released under the Artistic 
License. See L<perlartistic>.

=head1 AUTHOR


=head1 SEE ALSO



The output of this would be in HTML, like this example on CPAN (not what I wrote). Cool right!

So is there a method similar to POD in which a developer can put there documentation inside of the code itself, without it being a comment?


JavaDocs are very similar to this. They are comments but they are a special form of comment that are then compiled to produce documents that look like the official Java documentation.

Both JavaDoc and POD are examples of "Documentation Generators" of which there are many. Wikipedia has a good sized list for a variety of platforms and languages.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.