Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 6f66f87ec44b6c623ed0b141648cc132 > files > 1352

doxygen-1.8.1.1-3.fc17.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Perl Module Output</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen_manual.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('perlmod.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Perl Module Output </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a name="perlmod"></a></p>
<p>Since version 1.2.18, Doxygen can generate a new output format we have called the "Perl Module output format". It has been designed as an intermediate format that can be used to generate new and customized output without having to modify the Doxygen source. Therefore, its purpose is similar to the XML output format that can be also generated by Doxygen. The XML output format is more standard, but the Perl Module output format is possibly simpler and easier to use.</p>
<p>The Perl Module output format is still experimental at the moment and could be changed in incompatible ways in future versions, although this should not be very probable. It is also lacking some features of other Doxygen backends. However, it can be already used to generate useful output, as shown by the Perl Module-based LaTeX generator.</p>
<p>Please report any bugs or problems you find in the Perl Module backend or the Perl Module-based LaTeX generator to the doxygen-develop mailing list. Suggestions are welcome as well.</p>
<h1><a class="anchor" id="using_perlmod_fmt"></a>
Usage</h1>
<p>When the <b>GENERATE_PERLMOD</b> tag is enabled in the Doxyfile, running Doxygen generates a number of files in the <b>perlmod/</b> subdirectory of your output directory. These files are the following:</p>
<ul>
<li>
<p class="startli"><b>DoxyDocs.pm</b>. This is the Perl module that actually contains the documentation, in the Perl Module format described <a class="el" href="perlmod.html#doxydocs_format">below</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>DoxyModel.pm</b>. This Perl module describes the structure of <b>DoxyDocs.pm</b>, independently of the actual documentation. See <a class="el" href="perlmod.html#doxymodel_format">below</a> for details.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>doxyrules.make</b>. This file contains the make rules to build and clean the files that are generated from the Doxyfile. Also contains the paths to those files and other relevant information. This file is intended to be included by your own Makefile.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>Makefile</b>. This is a simple Makefile including <b>doxyrules.make</b>.</p>
<p class="endli"></p>
</li>
</ul>
<p>To make use of the documentation stored in DoxyDocs.pm you can use one of the default Perl Module-based generators provided by Doxygen (at the moment this includes the Perl Module-based LaTeX generator, see <a class="el" href="perlmod.html#perlmod_latex">below</a>) or write your own customized generator. This should not be too hard if you have some knowledge of Perl and it's the main purpose of including the Perl Module backend in Doxygen. See <a class="el" href="perlmod.html#doxydocs_format">below</a> for details on how to do this.</p>
<h1><a class="anchor" id="perlmod_latex"></a>
Using the LaTeX generator.</h1>
<p>The Perl Module-based LaTeX generator is pretty experimental and incomplete at the moment, but you could find it useful nevertheless. It can generate documentation for functions, typedefs and variables within files and classes and can be customized quite a lot by redefining TeX macros. However, there is still no documentation on how to do this.</p>
<p>Setting the <b>PERLMOD_LATEX</b> tag to <b>YES</b> in the Doxyfile enables the creation of some additional files in the <b>perlmod/</b> subdirectory of your output directory. These files contain the Perl scripts and LaTeX code necessary to generate PDF and DVI output from the Perl Module output, using PDFLaTeX and LaTeX respectively. Rules to automate the use of these files are also added to <b>doxyrules.make</b> and the <b>Makefile</b>.</p>
<p>The additional generated files are the following:</p>
<ul>
<li>
<p class="startli"><b>doxylatex.pl</b>. This Perl script uses DoxyDocs.pm and DoxyModel.pm to generate <b>doxydocs.tex</b>, a TeX file containing the documentation in a format that can be accessed by LaTeX code. This file is not directly LaTeXable.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>doxyformat.tex</b>. This file contains the LaTeX code that transforms the documentation from doxydocs.tex into LaTeX text suitable to be LaTeX'ed and presented to the user.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>doxylatex-template.pl</b>. This Perl script uses DoxyModel.pm to generate <b>doxytemplate.tex</b>, a TeX file defining default values for some macros. doxytemplate.tex is included by doxyformat.tex to avoid the need of explicitly defining some macros.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>doxylatex.tex</b>. This is a very simple LaTeX document that loads some packages and includes doxyformat.tex and doxydocs.tex. This document is LaTeX'ed to produce the PDF and DVI documentation by the rules added to <b>doxyrules.make</b>.</p>
<p class="endli"></p>
</li>
</ul>
<h2><a class="anchor" id="pm_pdf_gen"></a>
Creation of PDF and DVI output</h2>
<p>To try this you need to have installed LaTeX, PDFLaTeX and the packages used by <b>doxylatex.tex</b>.</p>
<ol>
<li>
<p class="startli">Update your Doxyfile to the latest version using:</p>
<pre>doxygen -u Doxyfile</pre><p class="endli"></p>
</li>
<li>
<p class="startli">Set both <b>GENERATE_PERLMOD</b> and <b>PERLMOD_LATEX</b> tags to YES in your Doxyfile.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Run Doxygen on your Doxyfile:</p>
<pre>doxygen Doxyfile</pre><p class="endli"></p>
</li>
<li>
<p class="startli">A <b>perlmod/</b> subdirectory should have appeared in your output directory. Enter the <b>perlmod/</b> subdirectory and run:</p>
<pre>make pdf</pre><p></p>
<p>This should generate a <b>doxylatex.pdf</b> with the documentation in PDF format.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Run:</p>
<pre>make dvi</pre><p></p>
<p>This should generate a <b>doxylatex.dvi</b> with the documentation in DVI format.</p>
<p class="endli"></p>
</li>
</ol>
<h1><a class="anchor" id="doxydocs_format"></a>
Documentation format.</h1>
<p>The Perl Module documentation generated by Doxygen is stored in <b>DoxyDocs.pm</b>. This is a very simple Perl module that contains only two statements: an assignment to the variable <b>$doxydocs</b> and the customary <b>1;</b> statement which usually ends Perl modules. The documentation is stored in the variable <b>$doxydocs</b>, which can then be accessed by a Perl script using <b>DoxyDocs.pm</b>.</p>
<p><b>$doxydocs</b> contains a tree-like structure composed of three types of nodes: strings, hashes and lists.</p>
<ul>
<li>
<p class="startli"><b>Strings</b>. These are normal Perl strings. They can be of any length can contain any character. Their semantics depends on their location within the tree. This type of node has no children.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>Hashes</b>. These are references to anonymous Perl hashes. A hash can have multiple fields, each with a different key. The value of a hash field can be a string, a hash or a list, and its semantics depends on the key of the hash field and the location of the hash within the tree. The values of the hash fields are the children of the node.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><b>Lists</b>. These are references to anonymous Perl lists. A list has an undefined number of elements, which are the children of the node. Each element has the same type (string, hash or list) and the same semantics, depending on the location of the list within the tree.</p>
<p class="endli"></p>
</li>
</ul>
<p>As you can see, the documentation contained in <b>$doxydocs</b> does not present any special impediment to be processed by a simple Perl script.</p>
<h1><a class="anchor" id="doxymodel_format"></a>
Data structure</h1>
<p>You might be interested in processing the documentation contained in <b>DoxyDocs.pm</b> without needing to take into account the semantics of each node of the documentation tree. For this purpose, Doxygen generates a <b>DoxyModel.pm</b> file which contains a data structure describing the type and children of each node in the documentation tree.</p>
<p>The rest of this section is to be written yet, but in the meantime you can look at the Perl scripts generated by Doxygen (such as <b>doxylatex.pl</b> or <b>doxytemplate-latex.pl</b>) to get an idea on how to use <b>DoxyModel.pm</b>. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
  </ul>
</div>
</body>
</html>