@node Devel/Symdump, Devel/TraceFuncs, Devel/SelfStubber, Module List
@unnumbered dump symbol names or the symbol table


@unnumberedsec NAME

Devel::Symdump - dump symbol names or the symbol table

@unnumberedsec SYNOPSIS

@example
# Constructor
require Devel::Symdump;
@@packs = qw(some_package another_package);
$obj = Devel::Symdump->new(@@packs);        # no recursion
$obj = Devel::Symdump->rnew(@@packs);       # with recursion
	
# Methods
@@array = $obj->packages;
@@array = $obj->scalars;
@@array = $obj->arrays;
@@array = $obj->hashs;
@@array = $obj->functions;
@@array = $obj->filehandles;
@@array = $obj->dirhandles;
@@array = $obj->unknowns;
	
$string = $obj->as_string;
$string = $obj1->diff($obj2);
@end example

@example
# Methods with autogenerated objects
# all of those call new(@@packs) internally
@@array = Devel::Symdump->packages(@@packs);
@@array = Devel::Symdump->scalars(@@packs);
@@array = Devel::Symdump->arrays(@@packs);
@@array = Devel::Symdump->hashes(@@packs);
@@array = Devel::Symdump->functions(@@packs);
@@array = Devel::Symdump->filehandles(@@packs);
@@array = Devel::Symdump->dirhandles(@@packs);
@@array = Devel::Symdump->unknowns(@@packs);
@end example

@unnumberedsec DESCRIPTION

This little package serves to access the symbol table of perl.

@unnumberedsubsec @code{Devel::Symdump->rnew(@@packages)} returns a symbol table object for all subtrees below @@packages. Nested Modules are analyzed recursively. If no package is given as argument, it defaults to @code{main}. That means to get the whole symbol table, just do a @code{rnew} without arguments.

@unnumberedsubsec @code{Devel::Symdump->new(@@packages)} does not go into recursion and only analyzes the packages that are given as arguments.

The methods packages(), scalars(), arrays(), hashes(), functions(),
filehandles(), dirhandles(), and unknowns() each return an array of
fully qualified symbols of the specified type in all packages that are
held within a Devel::Symdump object, but without the leading @code{$},
@code{@@} or %.  In a scalar context, they will return the number of
such symbols.  Unknown symbols are usually either formats or variables
that haven@'t yet got a defined value.

As_string() prints a simple string representation of the object.

Diff() prints the difference between two Devel::Symdump objects in
human readable form. The format is similar to the one used by the
as_string method.

@unnumberedsec SUBCLASSING

The design of this package is intentionally primitiv and allows it to
be subclassed easily. An example of a useful subclass is
Devel::Symdump::Export, a package which exports all methods of the
Devel::Symdump package and turns them into functions.

@unnumberedsec AUTHORS

Andreas Koenig @file{<koenig@@franz.ww.TU-Berlin.DE>} and Tom
Christiansen @file{<tchrist@@perl.com>}.  Based on the old
@file{dumpvar.pl} by Larry Wall.

@unnumberedsec VERSION

This release is $Revision: 1.23 $.

