JSDoc style commenting for Perl Objects and sub

113 Views Asked by At

I'm looking for a way of implementing JSDoc style comments in Perl. I've gotten myself stuck in a bit of a Google loop when I search for "JSDoc" and "Perl" because apparently JSDoc is/was written in Perl, and therefore all of my research pushes me in the wrong direction.

I understand that POD is the standard for generating CPAN style documentation, but I haven't had any luck digging up any detailed examples beyond:

  =head1 MYMODULE
  My module is awesome
  =cut

What I'm hoping to have, is something that would be able to handle a comment similar to JSDoc, that supports comments such as this:

/** A sub that does things to AnotherModule
  @description A detailed description of the sub
  @param {MyModule::AnotherModule} anotherModule Another Module
  @returns {MyModule::YetAnotherModule} A modified object
*/
sub ProcessAnotherModule {
...

In a random screenshot on Google search, I've seen a single examples of this:

# @param name Your name
# @return A welcome message
sub hello {
  my $name = shift;
  return "Hello " . $name;
}

Which leads me to believe that somewhere out there, there is a code comment library for handing this.

Any recommendations?

FYI, I'm using Eclipse & Epic, so bonus points if there's a solution that can be implemented in that environment and maybe could output code hinting etc

0

There are 0 best solutions below