5

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?

Community
  • 1
  • 1
Kamikaze
  • 854
  • 13
  • 19

2 Answers2

6

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.

friedo
  • 65,762
  • 16
  • 114
  • 184
4

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

scrappedcola
  • 10,423
  • 1
  • 32
  • 43