Devel::FindBlessedRefs - find all refs blessed under a package
use Devel::FindBlessedRefs qw(:all); my @refs = find_refs("PackageName"); # this is somewhat inefficient and is probably only useful for testing
If you're so inclined, you could also search this way:
use Scalar::Util qw(blessed); my @refs; find_refs_by_coderef(sub { my $sv = shift; if( ref($sv) and blessed($sv) ) { push @refs, $sv if $sv->isa("PackageName"); } });
Paul Miller <jettero@cpan.org>
<jettero@cpan.org>
I am using this software in my own projects... If you find bugs, please please please let me know. :) Actually, let me know if you find it handy at all. Half the fun of releasing this stuff is knowing that people use it.
Copyright © 2007 Paul Miller — LGPL [attached]
perl(1)
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install Devel::FindBlessedRefs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::FindBlessedRefs
CPAN shell
perl -MCPAN -e shell install Devel::FindBlessedRefs
For more information on module installation, please visit the detailed CPAN module installation guide.