# 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; # deprecated, use ios instead
@array = $obj->dirhandles; # deprecated, use ios instead
@array = $obj->ios;
@array = $obj->unknowns;
$string = $obj->as_string;
$string = $obj->as_HTML;
$string = $obj1->diff($obj2);
$string = Devel::Symdump->isa_tree; # or $obj->isa_tree
$string = Devel::Symdump->inh_tree; # or $obj->inh_tree
# 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->ios(@packs);
@array = Devel::Symdump->unknowns(@packs);
The interface has changed slightly between the perl versions 5.003 and
5.004. To be precise, from perl5.003_11 the names of the members of a GLOB
have changed. IO is the internal name for all kinds of input-output handles while FILEHANDLE and DIRHANDLE are deprecated.
Devel::Symdump accordingly introduces the new method ios() which returns
filehandles and directory handles. The old methods filehandles() and
dirhandles() are still supported for a transitional period.
They will probably have to go in future versions.
Devel::Symdump->rnew(@packages)
main. That means to get the whole symbol table, just do a rnew without arguments.
Devel::Symdump->new(@packages)
The methods packages(), scalars(),
arrays(), hashes(), functions(),
ios(), 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 $, @ or %. In a scalar context, they will return the number of such symbols. Unknown
symbols are usually either formats or variables that haven&39;t yet got a defined value.
As_string() and as_HTML() return a simple
string/HTML representations 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.
Isa_tree() and inh_tree() both return a simple
string representation of the current inheritance tree. The difference
between the two methods is the direction from which the tree is viewed:
top-down or bottom-up. As I&39;m sure, many users will have different expectation about what is top and
what is bottom, I&39;ll provide an example what happens when the Socket module is loaded:
AutoLoader
DynaLoader
Socket
DynaLoader
Socket
Exporter
Carp
Config
Socket
The inh_tree method shows on the left hand side a package name and indented to the right the packages that use the former.
Carp
Exporter
Config
Exporter
DynaLoader
AutoLoader
Socket
Exporter
DynaLoader
AutoLoader
The isa_tree method displays from left to right ISA relationships, so Socket IS A DynaLoader and DynaLoader IS A AutoLoader. (At least at the time this manpage was written :-)
isa_tree() and
inh_tree(), with an object. If you do that, the object will
store the output and retrieve it when you call the same method again later.
The typical usage would be to use them as class methods directly though.