From: John Napiorkowski Date: Thu, 8 Jul 2010 13:11:14 +0000 (+0000) Subject: fixed running unnder http server test failure and added some pod X-Git-Tag: 5.89000~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=df1fa879e566937a591446d454bb8d3a17a70a2c;hp=532f0516947cf047368e91150ca2ab1cfd4c1e64 fixed running unnder http server test failure and added some pod --- diff --git a/Makefile.PL b/Makefile.PL index e69faa3..2b1fdae 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -59,6 +59,7 @@ requires 'Plack::Middleware::ReverseProxy' => '0.04'; test_requires 'Class::Data::Inheritable'; test_requires 'Test::Exception'; test_requires 'Test::More' => '0.88'; +test_requires 'Data::Dump'; # aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.35_05')) { diff --git a/lib/Catalyst/Engine/Loader.pm b/lib/Catalyst/Engine/Loader.pm index bb23841..5de0acc 100644 --- a/lib/Catalyst/Engine/Loader.pm +++ b/lib/Catalyst/Engine/Loader.pm @@ -39,4 +39,31 @@ around guess => sub { }; __PACKAGE__->meta->make_immutable( inline_constructor => 0 ); + 1; + +__END__ + +=head1 NAME + +Catalyst::Engine::Loader - The Catalyst Engine Loader + +=head1 SYNOPSIS + +See L. + +=head1 DESCRIPTION + +Wrapper on L which resets the ::Engine if you are using some +version of mod_perl. + +=head1 AUTHORS + +Catalyst Contributors, see Catalyst.pm + +=head1 COPYRIGHT + +This library is free software. You can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut diff --git a/t/aggregate/live_engine_request_env.t b/t/aggregate/live_engine_request_env.t index 571ee68..59a2219 100644 --- a/t/aggregate/live_engine_request_env.t +++ b/t/aggregate/live_engine_request_env.t @@ -24,8 +24,6 @@ use HTTP::Headers; use HTTP::Request::Common; { - my $env; - my $response = request("http://localhost/dump/env", { extra_env => { $EXPECTED_ENV_VAR => $EXPECTED_ENV_VAL }, }); @@ -33,6 +31,8 @@ use HTTP::Request::Common; ok( $response, 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); + + my $env; ok( eval '$env = ' . $response->content, 'Unserialize Catalyst::Request' ); is ref($env), 'HASH'; ok exists($env->{PATH_INFO}), 'Have a PATH_INFO env var'; diff --git a/t/lib/TestApp/View/Dump/Env.pm b/t/lib/TestApp/View/Dump/Env.pm index a869be3..d713b0e 100644 --- a/t/lib/TestApp/View/Dump/Env.pm +++ b/t/lib/TestApp/View/Dump/Env.pm @@ -13,5 +13,14 @@ sub process { }); } +## We override Data::Dumper here since its not reliably outputting +## something that is roundtrip-able. + +sub dump { + my ( $self, $reference ) = @_; + use Data::Dump (); + return Data::Dump::dump($reference); +} + 1;