in reply to Getting the name of sub from sub reference
Why not just let Perl tell you?
if( !defined &$c ){ eval{ $c->() }; print $@ };; Undefined subroutine &main::test1 called at (eval 19) line 1, <STDIN> +line 14. [download]