use B qw(svref_2object); use Foo::Bar; my $self = Foo::Bar->new; # wrap a method call in a sub my $anon = sub { $self->mumble("blah\n") }; # pass the coderef to $self->grumble($anon, qw(one two three)); # ...meanwhile in Foo::Bar... sub grumble { my $self = shift; my $anon = shift; my @args = @_; # Get the name of the sub my $anon_cv = svref_2object ( $anon ); my $anon_gv = $anon_cv->GV; my $anon_name = $anon_gv->NAME; print "About to call $anon_name...\n"; $anon->(@args); }