Perl 有类似 Java/PHP Docs 的东西吗? [英] Does Perl have something like Java/PHP Docs?

查看:49
本文介绍了Perl 有类似 Java/PHP Docs 的东西吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Perl 有 Perl Docs 生成器吗?像 Java Docs 或 PHP Documenter 之类的东西?

Does Perl have a Perl Docs generator? Something like Java Docs or PHP Documenter?

推荐答案

是的,它叫做 perldoc

您只需在源代码中编写文档,就像使用 javadoc 一样.

You simply write documentation in the source, just like with javadoc.

简而言之,=item"是一个项目符号,例如函数或参数=over"下降一个标识级别,=back"上升一个级别.在要切换回 perl 代码的地方使用=cut".

Briefly, "=item" is a bulleted item, e.g. a function or a parameter "=over" goes down a level of identation, "=back" goes up a level. Use "=cut" where you want to switch back to perl code.

以下是它的外观示例:

=item $b->add_module ( %options )

Initialize a module. A module is a repository or a branch of a repository.
Valid options are

=over

=item id

Id of this module

=item repo

Url of repository. Currently only subversion repositories are supported.

=back

=cut
sub add_module($%)
{

只需通过 perldoc 程序传递您的 perl 代码即可获得格式化的文档.

Simply pass your perl code through the perldoc program to get the formatted documentation.

这篇关于Perl 有类似 Java/PHP Docs 的东西吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆