The Perl 5 module Sub::Identify allows you to retrieve the real name of code references.