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 {