use My::Wrapper qw(wrap); sub hello_world { my %params = %{shift()}; my $q = $params{q}; # etc. # different stuff here } wrap( \&hello_world );