Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl subroutine documentation [duplicate]

Tags:

perl

Possible Duplicates:
Does Perl have something like Java/PHP Docs?
What's the best way to document Perl code?

is there a way to write a subroutine docs?
such as

sub add {
#docs: this subroutine adds two numbers
}

and extract that info later?

like image 294
Kamikaze Avatar asked Dec 28 '22 21:12

Kamikaze


2 Answers

The standard method for writing Perl documentation is with POD. The perldoc command will extract POD and display it nicely for you. You can also use various tools like pod2html to turn it into HTML.

like image 175
friedo Avatar answered Jan 12 '23 01:01

friedo


There is a javadoc like setup called pod. You can learn more about it via: perldoc perlpod or here: http://perldoc.perl.org/perlpod.html

like image 41
scrappedcola Avatar answered Jan 12 '23 03:01

scrappedcola