Devel::hdb::DB::PackageInfo - Get information about packages and subroutines
my $pkg_list = namespaces_in_package('Foo'); my $sub_list = subs_in_pacakge('Foo');
Returns a listref of all the namespace names under the given package. If package Foo::Bar is loaded, then the namespaces under package "main" is "Foo", and the namespaces under "Foo" is "Bar".
Returns a listref of function names under the given package.
Given a subroutine name (including package), returns a hashref of information about where the subroutine was declared: file Filename start Line where the subroutine starts end Line where the subroutine ends source Original source file of the subroutine text source_line Line in the original source file
source and source_loc can differ from file and start in the case of subroutines defined inside of a string eval. In this case, "file" will be a string like (eval 23)[/some/file/path/module.pm:123] representing the text that was eval-ed, and "start" will be the line within that text where the subroutine was defined. "source" would be /some/file/path/module.pm showing where in the original source code the text came from, and "source_line" would be 123, the line in the original source file.
Devel::hdb
Anthony Brummett <brummett@cpan.org>
Copyright 2013, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
To install Devel::hdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::hdb
CPAN shell
perl -MCPAN -e shell install Devel::hdb
For more information on module installation, please visit the detailed CPAN module installation guide.