X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestFromPSGI.pm;h=31f486d6b604f9dd92114cf961ee7fb36813e5ee;hp=9b16aec85658599418ef2df5c330cd650f1899c8;hb=82010ea176741c7a4f2baf3f6f27377b1d9f6b15;hpb=952ff53094bcabafb62064922bf33f5a0269450f diff --git a/t/lib/TestFromPSGI.pm b/t/lib/TestFromPSGI.pm index 9b16aec..31f486d 100644 --- a/t/lib/TestFromPSGI.pm +++ b/t/lib/TestFromPSGI.pm @@ -1,37 +1,11 @@ package TestFromPSGI; use Moose; -use Plack::Middleware::Static; -use Plack::App::File; use Catalyst; -extends 'Catalyst'; - -my $static = Plack::Middleware::Static->new( - path => qr{^/static/}, root => TestMiddleware->path_to('share')); - __PACKAGE__->config( 'Controller::Root', { namespace => '' }, - 'psgi_middleware', [ - 'Head', - $static, - 'Static', { path => qr{^/static2/}, root => TestMiddleware->path_to('share') }, - 'Runtime', - '+TestMiddleware::Custom', { path => qr{^/static3/}, root => TestMiddleware->path_to('share') }, - sub { - my $app = shift; - return sub { - my $env = shift; - if($env->{PATH_INFO} =~m/forced/) { - Plack::App::File->new(file=>TestMiddleware->path_to(qw/share static forced.txt/)) - ->call($env); - } else { - return $app->($env); - } - }, - }, - - ], + use_hash_multivalue_in_request => 1, ); __PACKAGE__->setup;