Help for this page
use warnings; use strict; ... print test($coderef, "Foo::bar"), "\n"; # 1 print test($coderef, "Foo::Bar"), "\n"; # 0 print test($null, "Foo::Bar"), "\n"; # dies appropriately
SV * test (SV * x, char * name) { if((CV*)SvRV(x) == get_cv(name, 0)) return newSVuv(1); return newSVuv(0); }
SV * foo1(SV * x) { return newSVpv(HvNAME(CvSTASH((CV*)SvRV(x))), 0); }