home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_defe2dcbacffa4f6bda4bf63e01673e2
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
122 lines
<HTML>
<HEAD>
<TITLE>B::Xref - Generates cross reference reports for Perl programs</TITLE>
<LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> B::Xref - Generates cross reference reports for Perl programs</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#options">OPTIONS</A></LI>
<LI><A HREF="#bugs">BUGS</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>B::Xref - Generates cross reference reports for Perl programs</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<P>perl -MO=Xref[,OPTIONS] foo.pl</P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>The B::Xref module is used to generate a cross reference listing of all
definitions and uses of variables, subroutines and formats in a Perl program.
It is implemented as a backend for the Perl compiler.</P>
<P>The report generated is in the following format:</P>
<PRE>
File filename1
Subroutine subname1
Package package1
object1 C<line numbers>
object2 C<line numbers>
...
Package package2
...</PRE>
<P>Each <STRONG>File</STRONG> section reports on a single file. Each <STRONG>Subroutine</STRONG> section
reports on a single subroutine apart from the special cases
``(definitions)'' and ``(main)''. These report, respectively, on subroutine
definitions found by the initial symbol table walk and on the main part of
the program or module external to all subroutines.</P>
<P>The report is then grouped by the <STRONG>Package</STRONG> of each variable,
subroutine or format with the special case ``(lexicals)'' meaning
lexical variables. Each <STRONG>object</STRONG> name (implicitly qualified by its
containing <STRONG>Package</STRONG>) includes its type <CODE>character(s)</CODE> at the beginning
where possible. Lexical variables are easier to track and even
included dereferencing information where possible.</P>
<P>The <CODE>line numbers</CODE> are a comma separated list of line numbers (some
preceded by code letters) where that object is used in some way.
Simple uses aren't preceded by a code letter. Introductions (such as
where a lexical is first defined with <A HREF="../../lib/Pod/perlfunc.html#item_my"><CODE>my</CODE></A>) are indicated with the
letter ``i''. Subroutine and method calls are indicated by the character
``&''. Subroutine definitions are indicated by ``s'' and format
definitions by ``f''.</P>
<P>
<HR>
<H1><A NAME="options">OPTIONS</A></H1>
<P>Option words are separated by commas (not whitespace) and follow the
usual conventions of compiler backend options.</P>
<DL>
<DT><STRONG><A NAME="item_%2DoFILENAME"><CODE>-oFILENAME</CODE></A></STRONG><BR>
<DD>
Directs output to <CODE>FILENAME</CODE> instead of standard output.
<P></P>
<DT><STRONG><A NAME="item_%2Dr"><CODE>-r</CODE></A></STRONG><BR>
<DD>
Raw output. Instead of producing a human-readable report, outputs a line
in machine-readable form for each definition/use of a variable/sub/format.
<P></P>
<DT><STRONG><A NAME="item_%2DD%5BtO%5D"><CODE>-D[tO]</CODE></A></STRONG><BR>
<DD>
(Internal) debug options, probably only useful if <A HREF="#item_%2Dr"><CODE>-r</CODE></A> included.
The <CODE>t</CODE> option prints the object on the top of the stack as it's
being tracked. The <CODE>O</CODE> option prints each operator as it's being
processed in the execution order of the program.
<P></P></DL>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P>Non-lexical variables are quite difficult to track through a program.
Sometimes the type of a non-lexical variable's use is impossible to
determine. Introductions of non-lexical non-scalars don't seem to be
reported properly.</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Malcolm Beattie, <A HREF="mailto:mbeattie@sable.ox.ac.uk.">mbeattie@sable.ox.ac.uk.</A></P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> B::Xref - Generates cross reference reports for Perl programs</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>