sub foo { print "in foo" } sub do { my $self = shift; my $meth = shift; $self->$meth(@_) } $object->do("foo", @args);