【发布时间】:2010-10-27 20:12:37
【问题描述】:
如何在我的 perlscript 中包含 doxygen perlmod?
我注意到您可以使用称为 perlmod 的 doxygen 生成替代输出, 但我找不到任何关于如何使用这部分的示例。
我在 DoxyDocs.pm 和 DoxyStructure.pm 中找到了 2 个不错的文件, 它们包含某种代表源代码的漂亮结构 (它看起来像一个数组/哈希码)。
但由于我的“高级 perl”有点生疏,我在开始使用这个小想法时遇到了问题......
谁能给我一个正确的方向?
谢谢 约翰
我应该使用 -I 来 perl 并“使用”那些 .pm 吗?
#!/usr/bin/perl -Icode/doc/perlmod/
use strict;
use warnings;
use DoxyStructure;
use DoxyDocs;
或者我应该以其他方式包含这些文件吗?也许是这样的?但问题是我无法启用严格和警告,因为我得到错误支持......
#!/usr/bin/perl
#use strict;
#use warnings;
require "code/doc/perlmod/DoxyDocs.pm";
更新
为了在 Doxygen 中启用 perlmod,我在 Doxyfile 中使用以下标志打开了它:
# If the GENERATE_PERLMOD tag is set to YES Doxygen will
# generate a Perl module file that captures the structure of
# the code including all documentation. Note that this
# feature is still experimental and incomplete at the
# moment.
GENERATE_PERLMOD = YES
# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = YES
然后 doxygen 在与 html 和 latex 相同的目录中创建一个名为 perlmod 的新目录,并在 perlmod 中找到我尝试使用的列表。
- perlmod/DoxyDocs.pm
- perlmod/doxyformat.tex
- perlmod/doxylatex.pl
- perlmod/doxylatex-structure.pl
- perlmod/doxylatex.tex
- perlmod/doxyrules.make
- perlmod/DoxyStructure.pm
- perlmod/Makefile
【问题讨论】: