Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / B / Xref.html
blobc73e1b9a8ef3102c0678eb84d7b3a1f7e4399e7b
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>B::Xref - Generates cross reference reports for Perl programs</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;B::Xref - Generates cross reference reports for Perl programs</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#options">OPTIONS</a></li>
26 <li><a href="#bugs">BUGS</a></li>
27 <li><a href="#author">AUTHOR</a></li>
28 </ul>
29 <!-- INDEX END -->
31 <hr />
32 <p>
33 </p>
34 <h1><a name="name">NAME</a></h1>
35 <p>B::Xref - Generates cross reference reports for Perl programs</p>
36 <p>
37 </p>
38 <hr />
39 <h1><a name="synopsis">SYNOPSIS</a></h1>
40 <p>perl -MO=Xref[,OPTIONS] foo.pl</p>
41 <p>
42 </p>
43 <hr />
44 <h1><a name="description">DESCRIPTION</a></h1>
45 <p>The B::Xref module is used to generate a cross reference listing of all
46 definitions and uses of variables, subroutines and formats in a Perl program.
47 It is implemented as a backend for the Perl compiler.</p>
48 <p>The report generated is in the following format:</p>
49 <pre>
50 File filename1
51 Subroutine subname1
52 Package package1
53 object1 line numbers
54 object2 line numbers
55 ...
56 Package package2
57 ...</pre>
58 <p>Each <strong>File</strong> section reports on a single file. Each <strong>Subroutine</strong> section
59 reports on a single subroutine apart from the special cases
60 ``(definitions)'' and ``(main)''. These report, respectively, on subroutine
61 definitions found by the initial symbol table walk and on the main part of
62 the program or module external to all subroutines.</p>
63 <p>The report is then grouped by the <strong>Package</strong> of each variable,
64 subroutine or format with the special case ``(lexicals)'' meaning
65 lexical variables. Each <strong>object</strong> name (implicitly qualified by its
66 containing <strong>Package</strong>) includes its type <code>character(s)</code> at the beginning
67 where possible. Lexical variables are easier to track and even
68 included dereferencing information where possible.</p>
69 <p>The <code>line numbers</code> are a comma separated list of line numbers (some
70 preceded by code letters) where that object is used in some way.
71 Simple uses aren't preceded by a code letter. Introductions (such as
72 where a lexical is first defined with <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_my"><code>my</code></a>) are indicated with the
73 letter ``i''. Subroutine and method calls are indicated by the character
74 ``&amp;''. Subroutine definitions are indicated by ``s'' and format
75 definitions by ``f''.</p>
76 <p>
77 </p>
78 <hr />
79 <h1><a name="options">OPTIONS</a></h1>
80 <p>Option words are separated by commas (not whitespace) and follow the
81 usual conventions of compiler backend options.</p>
82 <dl>
83 <dt><strong><a name="item__2dofilename"><code>-oFILENAME</code></a></strong>
85 <dd>
86 <p>Directs output to <code>FILENAME</code> instead of standard output.</p>
87 </dd>
88 </li>
89 <dt><strong><a name="item__2dr"><code>-r</code></a></strong>
91 <dd>
92 <p>Raw output. Instead of producing a human-readable report, outputs a line
93 in machine-readable form for each definition/use of a variable/sub/format.</p>
94 </dd>
95 </li>
96 <dt><strong><a name="item__2dd"><code>-d</code></a></strong>
98 <dd>
99 <p>Don't output the ``(definitions)'' sections.</p>
100 </dd>
101 </li>
102 <dt><strong><a name="item__2dd_5bto_5d"><code>-D[tO]</code></a></strong>
104 <dd>
105 <p>(Internal) debug options, probably only useful if <a href="#item__2dr"><code>-r</code></a> included.
106 The <code>t</code> option prints the object on the top of the stack as it's
107 being tracked. The <code>O</code> option prints each operator as it's being
108 processed in the execution order of the program.</p>
109 </dd>
110 </li>
111 </dl>
113 </p>
114 <hr />
115 <h1><a name="bugs">BUGS</a></h1>
116 <p>Non-lexical variables are quite difficult to track through a program.
117 Sometimes the type of a non-lexical variable's use is impossible to
118 determine. Introductions of non-lexical non-scalars don't seem to be
119 reported properly.</p>
121 </p>
122 <hr />
123 <h1><a name="author">AUTHOR</a></h1>
124 <p>Malcolm Beattie, <a href="mailto:mbeattie@sable.ox.ac.uk.">mbeattie@sable.ox.ac.uk.</a></p>
125 <table border="0" width="100%" cellspacing="0" cellpadding="3">
126 <tr><td class="block" style="background-color: #cccccc" valign="middle">
127 <big><strong><span class="block">&nbsp;B::Xref - Generates cross reference reports for Perl programs</span></strong></big>
128 </td></tr>
129 </table>
131 </body>
133 </html>