Devel-Symdump
view release on metacpan or search on metacpan
lib/Devel/Symdump.pm view on Meta::CPAN
=item isa_tree
=item inh_tree
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'm sure, many users will have different expectation
about what is top and what is bottom, I'll provide an example what
happens when the Socket module is loaded:
=item % print Devel::Symdump-E<gt>inh_tree
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.
=item % print Devel::Symdump-E<gt>isa_tree
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. (Actually, they
were at the time this manpage was written)
=back
You may call both methods, 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.
=head1 SUBCLASSING
The design of this package is intentionally primitive and allows it to
be subclassed easily. An example of a (maybe) useful subclass is
Devel::Symdump::Export, a package which exports all methods of the
Devel::Symdump package and turns them into functions.
=head1 SEE ALSO
Routines for manipulating stashes: C<Package::Stash>; to work with
lexicals: C<PadWalker>.
=head1 AUTHORS
Andreas Koenig F<< <andk@cpan.org> >> and Tom Christiansen
F<< <tchrist@perl.com> >>. Based on the old F<dumpvar.pl> by Larry
Wall.
=head1 COPYRIGHT, LICENSE
This module is
Copyright (c) 1995, 1997, 2000, 2002, 2005, 2006 Andreas Koenig C<< <andk@cpan.org> >>.
All rights reserved.
This library is free software;
you may use, redistribute and/or modify it under the same
terms as Perl itself.
=cut
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# End:
( run in 2.619 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )