【问题标题】:How can I include doxygen perlmod in my perlscript?如何在我的 perlscript 中包含 doxygen perlmod?
【发布时间】: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

【问题讨论】:

    标签: perl doxygen


    【解决方案1】:

    你的意思是perlpod?这比 Doxygen 更像是 Perl 标准。它可以生成纯文本、HTML 或 nroff 格式的输出(使用 pod2textpod2htmlpod2man 工具)。你为什么不改用它呢?

    【讨论】:

      猜你喜欢
      • 2012-09-07
      • 2019-10-05
      • 2015-12-16
      • 2011-09-14
      • 2011-03-04
      • 1970-01-01
      • 1970-01-01
      • 2013-02-07
      • 1970-01-01
      相关资源
      最近更新 更多