```{index} single: get_code_info (Class::MOP) ``` ```{index} single: Class::MOP::get_code_info ``` # get_code_info The package and the name a sub was defined under. ## Synopsis ```perl use Class::MOP; my ($package, $name) = Class::MOP::get_code_info(\&Foo::bar); # ('Foo', 'bar') ``` ## What you get back The name of the package of the glob the sub was defined in, and the sub's own name in it: `__ANON__` for an anonymous sub. Nothing for what is not a code reference, or for a sub that is still being compiled.