我试图弄清楚如何使用
Doxygen::Filter::Perl
生成Perl文件的文档.我从一个非常简单的文件开始,看看我是否可以让它工作(test_doxygen.pl):
#! /usr/bin/env perl #** @file test_doxygen.pl # @brief Testing Doxygen using Doxygen::Filter::Perl # # Description of the purpose of this file # # @author Håkon Hægland (hakon.hagland@gmail.com) # # @bug No known bugs. # #* #** @class main # The main class #* use strict; use warnings; my $b = add_one(1); #** @function public add_one ($par1) # @brief A brief description of the function # # A detailed description of the function # @params $par1 required A number # @retval value Input value plus one1 #* sub add_one { my ($par1) = @_; return $par1 + 1; }
然后我安装了Doxygen :: Filter :: Perl并使用了Metacpan.org上的软件包维护者提供的Doxyfile配置文件(the link is here)
并将其放在与上面脚本相同的目录中.我在Doxyfile中更改了一行:INPUT标记的值从lib更改为空字符串,以便仅搜索当前目录中的源文件.
我使用的是Ubuntu 14.04,所以我用sudo apt-get install doxygen安装了Doxygen,(我还需要安装graphviz:sudo apt-get install graphviz)然后我终于运行了
$doxygen
从终端窗口.生成的HTML文件doc / html / index.html包含有关文件和作者的文档,但它不包含add_one子例程的任何文档.
我在这里错过了什么?
更新
以下是Chromium浏览器中类视图的外观:
如图所示,add_one子例程没有引用/链接.
这是文件视图: