check_method_cache_flag:
check the PL_sub_generation
ISA/method cache thing
-
-get_code_info:
- Pass in a coderef, returns:
- [ $pkg_name, $coderef_name ] ie:
- [ 'Foo::Bar', 'new' ]
*/
MODULE = Class::MOP PACKAGE = Class::MOP
OUTPUT:
RETVAL
-void
-get_code_info(coderef)
- SV* coderef
- PREINIT:
- char* name;
- char* pkg;
- PPCODE:
- if( SvOK(coderef) && SvROK(coderef) && SvTYPE(SvRV(coderef)) == SVt_PVCV){
- coderef = SvRV(coderef);
- name = GvNAME( CvGV(coderef) );
- pkg = HvNAME( GvSTASH(CvGV(coderef)) );
-
- EXTEND(SP, 2);
- PUSHs(newSVpvn(pkg, strlen(pkg)));
- PUSHs(newSVpvn(name, strlen(name)));
- }
-
all_from 'lib/Class/MOP.pm';
license 'perl';
-requires 'Scalar::Util' => '1.18';
-requires 'Sub::Name' => '0.02';
-requires 'MRO::Compat' => '0.05';
-requires 'Carp' => '0';
+requires 'Scalar::Util' => '1.18';
+requires 'Sub::Name' => '0.02';
+requires 'MRO::Compat' => '0.05';
+requires 'Carp' => '0';
+requires 'Sub::Identify' => '0.02';
build_requires 'Test::More' => '0.62';
build_requires 'Test::Exception' => '0.21';
use Carp 'confess';
use Scalar::Util 'weaken';
+use Sub::Identify 'sub_name', 'stash_name';
use Class::MOP::Class;
use Class::MOP::Attribute;
}
}
+sub get_code_info {
+ (&stash_name, &sub_name)
+}
+
# sub subname { $_[1] }
BEGIN {