my $returned = Foo::Bar->some_func($sent); # in Foo::Bar (or any package that Foo::Bar derives from) sub some_func { my $class_name = shift; # will be Foo::Bar, even if we aren't in that package right now my $received = shift; # ... $value }