This manual page is for Mac OS X version 10.6

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



B::Xref(3pm)                          Perl Programmers Reference Guide                          B::Xref(3pm)



NAME
       B::Xref - Generates cross reference reports for Perl programs

SYNOPSIS
       perl -MO=Xref[,OPTIONS] foo.pl

DESCRIPTION
       The B::Xref module is used to generate a cross reference listing of all definitions and uses of vari-ables, variables,
       ables, subroutines and formats in a Perl program.  It is implemented as a backend for the Perl com-piler. compiler.
       piler.

       The report generated is in the following format:

           File filename1
             Subroutine subname1
               Package package1
                 object1        line numbers
                 object2        line numbers
                 ...
               Package package2
               ...

       Each File section reports on a single file. Each Subroutine 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.

       The report is then grouped by the Package of each variable, subroutine or format with the special
       case "(lexicals)" meaning lexical variables. Each object name (implicitly qualified by its containing
       Package) includes its type character(s) at the beginning where possible. Lexical variables are easier
       to track and even included dereferencing information where possible.

       The "line numbers" 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 "my") 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".

OPTIONS
       Option words are separated by commas (not whitespace) and follow the usual conventions of compiler
       backend options.

       "-oFILENAME"
               Directs output to "FILENAME" instead of standard output.

       "-r"    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.

       "-d"    Don't output the "(definitions)" sections.

       "-D[tO]"
               (Internal) debug options, probably only useful if "-r" included.  The "t" option prints the
               object on the top of the stack as it's being tracked. The "O" option prints each operator as
               it's being processed in the execution order of the program.

BUGS
       Non-lexical variables are quite difficult to track through a program.  Sometimes the type of a non-lexical nonlexical
       lexical variable's use is impossible to determine. Introductions of non-lexical non-scalars don't
       seem to be reported properly.

AUTHOR
       Malcolm Beattie, [email protected].



perl v5.8.9                                      2001-09-21                                     B::Xref(3pm)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation to the Perl project. (See perlbug(1) for submission instructions.)
Bug reports
Report bugs in the functionality of the described tool or API to Apple through Bug Reporter and to the Perl project using perlbug(1).
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.