Using Doxygen with Perl for PS1-MOPS

whooploafΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 8 μήνες)

75 εμφανίσεις

Using Doxygen with Perl for
PS1-MOPS
Daniel Chang
Doxygen and Perl
Doxygen does not have native support for
Perl.
Doxygen may be used with Perl by first
preprocessing Perl source code with a
filter.
The filter produces Doxygen-compatible
input.
Doxygen Products
HTML API reference
Manual pages
LaTeXdocumentation
Programming elements
Source code hierarchy
Namespace
Class
Perl modules
Subroutine
Functions and methods
POD (plain old documentation)
NAME
SYNOPSIS
DESCRIPTION
FUNCTIONS
METHODS
Program/class
-
level
documentation
Doxygen filter commands
## @file
## @class
# @par
# @note
# @see
Sample code
##@file example-perl-executable.pl
# A Perl executable containing examples for Doxygen documentation.
# @par DESCRIPTION
# This is an example Perl executable containing source code
documentation to
# be parsed by a Doxygen filter. Multiple lines may be present, but the
first
# sentence or phrase, after the filename, is considered to be the brief
# description for the file.
# @par SYNOPSIS
# Inserting a CR/linefeed is demonstrated here.
# Run by calling\n
# \$ ./example-perl-executable.pl
Sample code
## @fn main()
# An example main function for a Perl executable.
sub main
{
# Function takes no arguments.
}
## @fn nonspecific_scope_function()
# An example function without specified access scope.
# @paramparam1 First parameter.
# @return 1 for true, 0 for false.
sub nonspecific_scope_function
{
my($param1)=@_;
return 1;
}
Sample output
Subroutine-level documentation
Doxygen filter commands
## @fn
## @method
## @cmethod
# @param
# @return
Sample output