9 Pass in a coderef, returns:
10 [ $pkg_name, $coderef_name ] ie:
14 MODULE = Class::MOP PACKAGE = Class::MOP
19 get_code_info(coderef)
25 if( SvOK(coderef) && SvROK(coderef) && SvTYPE(SvRV(coderef)) == SVt_PVCV){
26 coderef = SvRV(coderef);
27 /* I think this only gets triggered with a mangled coderef, but if
28 we hit it without the guard, we segfault. The slightly odd return
29 value strikes me as an improvement (mst)
32 if ( isGV_with_GP(CvGV(coderef))) {
34 pkg = HvNAME( GvSTASH(CvGV(coderef)) );
35 name = GvNAME( CvGV(coderef) );
44 PUSHs(newSVpvn(pkg, strlen(pkg)));
45 PUSHs(newSVpvn(name, strlen(name)));