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 rprobably 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 <paul@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 (c) 2007 Paul Miller -- LGPL [attached]
perl(1)
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.