sub do_something_with_a_uri { my $self = shift; my $uri = shift || die "uri is required"; my $method = $self->method; # You have to work out how to keep the JSON/Env stuff. $self->$method($uri); }