1

我正在寻找一种在 Perl 中实现 JSDoc 样式注释的方法。当我搜索“JSDoc”和“Perl”时,我让自己陷入了一些谷歌循环,因为显然 JSDoc 是/是用 Perl 编写的,因此我所有的研究都把我推向了错误的方向。

我知道 POD 是生成 CPAN 样式文档的标准,但我没有任何运气挖掘出任何详细示例:

  =head1 MYMODULE
  My module is awesome
  =cut

我希望拥有的是能够处理类似于 JSDoc 的评论的东西,它支持如下评论:

/** 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 {
...

在谷歌搜索的随机截图中,我看到了一个这样的例子:

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

这让我相信在某个地方,有一个代码注释库可以处理这个问题。

有什么建议吗?

仅供参考,我正在使用 Eclipse 和 Epic,所以如果有可以在该环境中实现的解决方案并且可能可以输出代码提示等,则可以加分

4

0 回答 0