my $action = { dosomething => 'something' }; my $method = $action->{dosomething}; $obj->$method(@args); #### my $action = { dosomething => sub { shift->something(@_) } }; my $whattodo = $action{dosomething}; $whattodo->($obj, @args);