sub run_request {
my $request = shift;
- my $response;
- test_psgi($app->to_psgi_app, sub { $response = shift->($request) });
- return $response;
+ return test_psgi $app->to_psgi_app, sub { shift->($request) };
}
my $get = run_request(GET 'http://localhost/');