use Carp 'confess';
use Scalar::Util 'reftype', 'blessed';
-use B 'svref_2object';
+#use B 'svref_2object';
our $VERSION = '0.05';
our $AUTHORITY = 'cpan:STEVAN';
# associated with the actual CODE-ref
sub package_name {
my $code = (shift)->body;
- svref_2object($code)->GV->STASH->NAME;
+ (Class::MOP::get_code_info($code))[0];
}
# NOTE:
# with the actual CODE-ref
sub name {
my $code = (shift)->body;
- svref_2object($code)->GV->NAME;
+ (Class::MOP::get_code_info($code))[1];
}
sub fully_qualified_name {
Stevan Little E<lt>stevan@iinteractive.comE<gt>
-Yuval Kogman E<lt>nothingmuch@woobling.comE<gt>
-
=head1 COPYRIGHT AND LICENSE
-Copyright 2006 by Infinity Interactive, Inc.
+Copyright 2006, 2007 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>