[Catalyst-commits] r8797 - in trunk/Catalyst-Engine-HTTP-Prefork/t: . lib lib/Catalyst lib/Catalyst/Action lib/Catalyst/Plugin lib/Catalyst/Plugin/Test lib/TestApp lib/TestApp/Action lib/TestApp/Controller lib/TestApp/Controller/Action lib/TestApp/Controller/Action/Auto lib/TestApp/Controller/Action/Chained lib/TestApp/Controller/Action/Chained/Auto lib/TestApp/Controller/Action/Chained/ParentChain lib/TestApp/Controller/Engine lib/TestApp/Controller/Engine/Request lib/TestApp/Controller/Engine/Response lib/TestApp/Controller/Priorities lib/TestApp/Model lib/TestApp/Model/Foo lib/TestApp/Plugin lib/TestApp/View lib/TestApp/View/Dump lib/TestAppChainedAbsolutePathPart lib/TestAppChainedAbsolutePathPart/Controller lib/TestAppChainedRecursive lib/TestAppChainedRecursive/Controller lib/TestAppOnDemand lib/TestAppOnDemand/Controller

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Mon Dec 8 21:28:20 GMT 2008


Author: andyg
Date: 2008-12-08 21:28:20 +0000 (Mon, 08 Dec 2008)
New Revision: 8797

Added:
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestAfter.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestBefore.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Errors.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Headers.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Plugin.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/PluginTestApp.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestBefore.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestMyAction.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Action.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Abort.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Deep.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Default.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Begin.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ArgsOrder.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Bar.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Detach.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Bar.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Foo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PassedArgs.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Root.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Default.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Detach.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/End.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Forward.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/ForwardTo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Global.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Go.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Inheritance.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Local.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Path.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Private.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Regexp.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Streaming.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestMultipath.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestRelative.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Args.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Dump.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Auth.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/URI.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Uploads.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Cookies.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Errors.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Headers.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Large.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Redirect.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Status.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Fork.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/MultiMethod.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/loc_vs_index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/locre_vs_index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/path_vs_index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/re_vs_index.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Root.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/Bar.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/FullyQualified.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Parameters.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Request.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Response.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/Foo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/Foo.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppDoubleAutoBug.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/Body.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppPathBug.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppStats.pm
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_auth.t
Modified:
   trunk/Catalyst-Engine-HTTP-Prefork/t/
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_chained.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_forward.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_path.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_regexp.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_parameters.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uploads.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uri.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_response_cookies.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/live_priorities.t
   trunk/Catalyst-Engine-HTTP-Prefork/t/optional_prefork-server.t
Log:
Sync up Prefork tests with 5.7 trunk


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t
___________________________________________________________________
Name: svn:externals
   - lib http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/trunk/t/lib


Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestAfter.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestAfter.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestAfter.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,15 @@
+package Catalyst::Action::TestAfter;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Action/;
+
+sub execute {
+    my $self = shift;
+    my ( $controller, $c ) = @_;
+    $self->NEXT::execute( @_ );
+    $c->res->header( 'X-Action-After', $c->stash->{after_message} );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestAfter.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestBefore.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestBefore.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestBefore.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,15 @@
+package Catalyst::Action::TestBefore;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Action/;
+
+sub execute {
+    my $self = shift;
+    my ( $controller, $c ) = @_;
+    $c->stash->{test} = 'works';
+    $self->NEXT::execute( @_ );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Action/TestBefore.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Errors.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Errors.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Errors.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,32 @@
+package Catalyst::Plugin::Test::Errors;
+
+use strict;
+
+sub error {
+    my $c = shift;
+
+    unless ( $_[0] ) {
+        return $c->NEXT::error(@_);
+    }
+
+    if ( $_[0] =~ /^(Unknown resource|No default action defined)/ ) {
+        $c->response->status(404);
+    }
+    
+    if ( $_[0] =~ /^Couldn\'t forward/ ) {
+        $c->response->status(404);
+    }    
+
+    if ( $_[0] =~ /^Caught exception/ ) {
+        $c->response->status(500);
+    }
+
+    my $error = $_[0];
+    $error =~ s/\n/, /g;
+
+    $c->response->headers->push_header( 'X-Catalyst-Error' => $error );
+
+    $c->NEXT::error(@_);
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Errors.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Headers.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Headers.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Headers.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,33 @@
+package Catalyst::Plugin::Test::Headers;
+
+use strict;
+
+sub prepare {
+    my $class = shift;
+
+    my $c = $class->NEXT::prepare(@_);
+
+    $c->response->header( 'X-Catalyst-Engine' => $c->engine );
+    $c->response->header( 'X-Catalyst-Debug' => $c->debug ? 1 : 0 );
+    
+    {
+        my $components = join( ', ', sort keys %{ $c->components } );
+        $c->response->header( 'X-Catalyst-Components' => $components );
+    }
+
+    {
+        no strict 'refs';
+        my $plugins = join ', ', $class->registered_plugins;
+        $c->response->header( 'X-Catalyst-Plugins' => $plugins );
+    }
+
+    return $c;
+}
+
+sub prepare_action {
+    my $c = shift;
+    $c->NEXT::prepare_action(@_);
+    $c->res->header( 'X-Catalyst-Action' => $c->req->action );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Headers.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Plugin.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Plugin.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,29 @@
+package Catalyst::Plugin::Test::Plugin;
+
+use strict;
+
+use base qw/Catalyst::Base Class::Data::Inheritable/;
+
+ __PACKAGE__->mk_classdata('ran_setup');
+
+sub setup {
+   my $c = shift;
+   $c->ran_setup('1');
+}
+
+sub  prepare {
+
+    my $class = shift;
+
+    my $c = $class->NEXT::prepare(@_);
+    $c->response->header( 'X-Catalyst-Plugin-Setup' => $c->ran_setup );
+
+    return $c;
+
+}
+
+sub end : Private {
+    my ($self,$c) = @_;
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/Catalyst/Plugin/Test/Plugin.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/PluginTestApp.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/PluginTestApp.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/PluginTestApp.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,67 @@
+package PluginTestApp;
+use Test::More;
+
+use Catalyst qw(
+        Test::Plugin
+        +TestApp::Plugin::FullyQualified
+        );
+
+sub compile_time_plugins : Local {
+    my ( $self, $c ) = @_;
+
+    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+    isa_ok $c, 'TestApp::Plugin::FullyQualified';
+
+    can_ok $c, 'registered_plugins';
+    $c->_test_plugins;
+
+    $c->res->body("ok");
+}
+
+sub run_time_plugins : Local {
+    my ( $self, $c ) = @_;
+
+    $c->_test_plugins;
+    my $faux_plugin = 'Faux::Plugin';
+
+# Trick perl into thinking the plugin is already loaded
+    $INC{'Faux/Plugin.pm'} = 1;
+
+    __PACKAGE__->plugin( faux => $faux_plugin );
+
+    isa_ok $c, 'Catalyst::Plugin::Test::Plugin';
+    isa_ok $c, 'TestApp::Plugin::FullyQualified';
+    ok !$c->isa($faux_plugin),
+    '... and it should not inherit from the instant plugin';
+    can_ok $c, 'faux';
+    is $c->faux->count, 1, '... and it should behave correctly';
+    is_deeply [ $c->registered_plugins ],
+    [
+        qw/Catalyst::Plugin::Test::Plugin
+        Faux::Plugin
+        TestApp::Plugin::FullyQualified/
+        ],
+    'registered_plugins() should report all plugins';
+    ok $c->registered_plugins('Faux::Plugin'),
+    '... and even the specific instant plugin';
+
+    $c->res->body("ok");
+}
+
+sub _test_plugins {
+    my $c = shift;
+    is_deeply [ $c->registered_plugins ],
+    [
+        qw/Catalyst::Plugin::Test::Plugin
+        TestApp::Plugin::FullyQualified/
+        ],
+    '... and it should report the correct plugins';
+    ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
+    '... or if we have a particular plugin';
+    ok $c->registered_plugins('Test::Plugin'),
+    '... even if it is not fully qualified';
+    ok !$c->registered_plugins('No::Such::Plugin'),
+    '... and it should return false if the plugin does not exist';
+}
+
+__PACKAGE__->setup;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/PluginTestApp.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestBefore.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestBefore.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestBefore.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,15 @@
+package TestApp::Action::TestBefore;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Action/;
+
+sub execute {
+    my $self = shift;
+    my ( $controller, $c, $test ) = @_;
+    $c->res->header( 'X-TestAppActionTestBefore', $test );
+    $self->NEXT::execute( @_ );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestBefore.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestMyAction.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestMyAction.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestMyAction.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Action::TestMyAction;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Action/;
+
+sub execute {
+    my $self = shift;
+    my ( $controller, $c, $test ) = @_;
+    $c->res->header( 'X-TestAppActionTestMyAction', 'MyAction works' );
+    $self->NEXT::execute(@_);
+}
+
+1;
+


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Action/TestMyAction.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Action.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Action.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Action.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,28 @@
+package TestApp::Controller::Action::Action;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub action_action_one : Global : ActionClass('TestBefore') {
+    my ( $self, $c ) = @_;
+    $c->res->header( 'X-Action', $c->stash->{test} );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub action_action_two : Global : ActionClass('TestAfter') {
+    my ( $self, $c ) = @_;
+    $c->stash->{after_message} = 'awesome';
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub action_action_three : Global : ActionClass('+TestApp::Action::TestBefore') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub action_action_four : Global : MyAction('TestMyAction') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Action.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Abort.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Abort.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Abort.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,26 @@
+package TestApp::Controller::Action::Auto::Abort;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 0;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort default' );
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort end' ) unless $c->res->body;
+}
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort one' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Abort.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Deep.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Deep.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Deep.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,21 @@
+package TestApp::Controller::Action::Auto::Deep;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'deep default' );
+}
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'deep one' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Deep.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Default.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Default.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Default.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,22 @@
+package TestApp::Controller::Action::Auto::Default;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub begin : Private { }
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    $c->stash->{auto_ran}++;
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( sprintf 'default (auto: %d)', $c->stash->{auto_ran} );
+}
+
+sub end : Private { }
+
+1;
+


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto/Default.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,21 @@
+package TestApp::Controller::Action::Auto;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'default' );
+}
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'one' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Auto.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Begin.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Begin.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Begin.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Action::Begin;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $self->SUPER::begin($c);
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Begin.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ArgsOrder.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ArgsOrder.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ArgsOrder.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,35 @@
+package TestApp::Controller::Action::Chained::ArgsOrder;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   This controller builds a simple chain of three actions that
+#   will output the arguments they got passed to @_ after the
+#   context object. We do this to test if that passing works
+#   as it should.
+#
+
+sub base  :Chained('/') PathPart('argsorder') CaptureArgs(0) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'base', $arg;
+}
+
+sub index :Chained('base') PathPart('') Args(0) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'index', $arg;
+}
+
+sub all  :Chained('base') PathPart('') Args() {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, 'all', $arg;
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+    no warnings 'uninitialized';
+    $c->response->body( join '; ', @{ $c->stash->{ passed_args } } );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ArgsOrder.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Bar.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Bar.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Bar.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Action::Chained::Auto::Bar;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   Test chain reaction if auto action returns 0.
+#
+sub auto        : Private { 0 }
+
+sub barend      : Chained('.') Args(1) { }
+
+sub crossloose  : Chained PathPart('chained/auto_cross') CaptureArgs(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Bar.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Detach.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Detach.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Detach.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,18 @@
+package TestApp::Controller::Action::Chained::Auto::Detach;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   For testing behaviour of a detaching auto action in a chain.
+#
+sub auto    : Private {
+    my ( $self, $c ) = @_;
+    $c->detach( '/action/chained/auto/fw3' );
+    return 1;
+}
+
+sub detachend  : Chained('/action/chained/auto/dt1') Args(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Detach.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Action::Chained::Auto::Foo;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   Test chain reaction if auto action returns 1.
+#
+sub auto        : Private { 1 }
+
+sub fooend      : Chained('.') Args(1) { }
+
+sub crossend    : Chained('/action/chained/auto/bar/crossloose') Args(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Foo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,18 @@
+package TestApp::Controller::Action::Chained::Auto::Forward;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   For testing behaviour of a forwarding auto action in a chain.
+#
+sub auto    : Private {
+    my ( $self, $c ) = @_;
+    $c->forward( '/action/chained/auto/fw3' );
+    return 1;
+}
+
+sub forwardend  : Chained('/action/chained/auto/fw1') Args(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto/Forward.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,33 @@
+package TestApp::Controller::Action::Chained::Auto;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   Provided for sub-auto tests. This just always returns true.
+#
+sub auto    : Private { 1 }
+
+#
+#   Simple chains with auto actions returning 1 and 0
+#
+sub foo     : Chained PathPart('chained/autochain1') CaptureArgs(1) { }
+sub bar     : Chained PathPart('chained/autochain2') CaptureArgs(1) { }
+
+#
+#   Detaching out of an auto action.
+#
+sub dt1     : Chained PathPart('chained/auto_detach') CaptureArgs(1) { }
+
+#
+#   Forwarding out of an auto action.
+#
+sub fw1     : Chained PathPart('chained/auto_forward') CaptureArgs(1) { }
+
+#
+#   Target for dispatch and forward tests.
+#
+sub fw3     : Private { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Auto.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Bar.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Bar.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Bar.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,14 @@
+package TestApp::Controller::Action::Chained::Bar;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+#
+#   Redispatching between controllers that are not in a parent/child
+#   relation. This is the root.
+#
+sub cross1 :PathPart('chained/cross') :CaptureArgs(1) :Chained('/') { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Bar.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Foo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Foo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Foo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,39 @@
+package TestApp::Controller::Action::Chained::Foo;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+#
+#   Child of current namespace
+#
+sub spoon :Chained('.') :Args(0) { }
+
+#
+#   Root for a action in a "parent" controller
+#
+sub higher_root :PathPart('chained/higher_root') :Chained('/') :CaptureArgs(1) { }
+
+#
+#   Parent controller -> this subcontroller -> parent controller test
+#
+sub pcp2 :Chained('/action/chained/pcp1') :CaptureArgs(1) { }
+
+#
+#   Controllers not in parent/child relation. This tests the end.
+#
+sub cross2 :PathPart('end') :Chained('/action/chained/bar/cross1') :Args(1) { }
+
+#
+#   Create a uri to the root index
+#
+sub to_root : Chained('/') PathPart('action/chained/to_root') {
+    my ( $self, $c ) = @_;
+    my $uri = $c->uri_for(
+        $c->controller('Root')->action_for('chain_root_index') );
+    $c->res->body( "URI:$uri" );
+    $c->stash->{no_end}++;
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Foo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,10 @@
+package TestApp::Controller::Action::Chained::ParentChain::Relative;
+use warnings;
+use strict;
+
+use base qw/ Catalyst::Controller /;
+
+# using ../ to go up more than one level
+sub chained_rel_two : Chained('../../one') Args(2) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain/Relative.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,25 @@
+package TestApp::Controller::Action::Chained::ParentChain;
+use warnings;
+use strict;
+
+use base qw/ Catalyst::Controller /;
+
+#
+#   Chains to the action /action/chained/parentchain in the
+#   Action::Chained controller.
+#
+sub child :Chained('.') :Args(1) { }
+
+# Should be at /chained/rootdef/*/chained_rel/*/*
+sub chained_rel :Chained('../one') Args(2) {
+}
+
+# Should chain to loose in parent namespace - i.e. at /chained/loose/*/loose/*/*
+sub loose : ChainedParent Args(2) {
+}
+
+# Should be at /chained/cross/*/up_down/*
+sub up_down : Chained('../bar/cross1') Args(1) {
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/ParentChain.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PassedArgs.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PassedArgs.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PassedArgs.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,34 @@
+package TestApp::Controller::Action::Chained::PassedArgs;
+use warnings;
+use strict;
+
+use base qw( Catalyst::Controller );
+
+#
+#   This controller builds a simple chain of three actions that
+#   will output the arguments they got passed to @_ after the
+#   context object. We do this to test if that passing works
+#   as it should.
+#
+
+sub first  : PathPart('chained/passedargs/a') Chained('/') CaptureArgs(1) {
+    my ( $self, $c, $arg ) = @_;
+    $c->stash->{ passed_args } = [ $arg ];
+}
+
+sub second : PathPart('b') Chained('first') CaptureArgs(1) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, $arg;
+}
+
+sub third  : PathPart('c') Chained('second') Args(1) {
+    my ( $self, $c, $arg ) = @_;
+    push @{ $c->stash->{ passed_args } }, $arg;
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+    $c->response->body( join '; ', @{ $c->stash->{ passed_args } } );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PassedArgs.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,12 @@
+package TestApp::Controller::Action::Chained::PathPrefix;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+# this is kinda the same thing as: sub instance : Path {}
+# it should respond to: /action/chained/pathprefix/*
+sub instance : Chained('/') PathPrefix Args(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/PathPrefix.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Root.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Root.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Root.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,13 @@
+package TestApp::Controller::Action::Chained::Root;
+
+use strict;
+use warnings;
+
+use base qw( Catalyst::Controller );
+
+__PACKAGE__->config->{namespace} = '';
+
+sub rootsub     : PathPart Chained( '/' )       CaptureArgs( 1 ) { }
+sub endpointsub : PathPart Chained( 'rootsub' ) Args( 1 )        { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained/Root.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,196 @@
+package TestApp::Controller::Action::Chained;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+sub begin :Private { }
+
+#
+#   TODO
+#   :Chained('') means what?
+#
+
+#
+#   Simple parent/child action test
+#
+sub foo  :PathPart('chained/foo')  :CaptureArgs(1) :Chained('/') { }
+sub endpoint  :PathPart('end')  :Chained('/action/chained/foo')  :Args(1) { }
+
+#
+#   Parent/child test with two args each
+#
+sub foo2 :PathPart('chained/foo2') :CaptureArgs(2) :Chained('/') { }
+sub endpoint2 :PathPart('end2') :Chained('/action/chained/foo2') :Args(2) { }
+
+#
+#   Relative specification of parent action
+#
+sub bar :PathPart('chained/bar') :Chained('/') :CaptureArgs(0) { }
+sub finale :PathPart('') :Chained('bar') :Args { }
+
+#
+#   three chain with concurrent endpoints
+#
+sub one   :PathPart('chained/one') :Chained('/')                   :CaptureArgs(1) { }
+sub two   :PathPart('two')         :Chained('/action/chained/one') :CaptureArgs(2) { }
+sub three_end :PathPart('three')       :Chained('two') :Args(3) { }
+sub one_end   :PathPart('chained/one') :Chained('/')   :Args(1) { }
+sub two_end   :PathPart('two')         :Chained('one') :Args(2) { }
+
+#
+#   Dispatch on number of arguments
+#
+sub multi1 :PathPart('chained/multi') :Chained('/') :Args(1) { }
+sub multi2 :PathPart('chained/multi') :Chained('/') :Args(2) { }
+
+#
+#   Roots in an action defined in a higher controller
+#
+sub higher_root :PathPart('bar') :Chained('/action/chained/foo/higher_root') :Args(1) { }
+
+#
+#   Controller -> subcontroller -> controller
+#
+sub pcp1 :PathPart('chained/pcp1')  :Chained('/')                        :CaptureArgs(1) { }
+sub pcp3 :Chained('/action/chained/foo/pcp2') :Args(1)     { }
+
+#
+#   Dispatch on capture number
+#
+sub multi_cap1 :PathPart('chained/multi_cap') :Chained('/') :CaptureArgs(1) { }
+sub multi_cap2 :PathPart('chained/multi_cap') :Chained('/') :CaptureArgs(2) { }
+sub multi_cap_end1 :PathPart('baz') :Chained('multi_cap1') :Args(0) { }
+sub multi_cap_end2 :PathPart('baz') :Chained('multi_cap2') :Args(0) { }
+
+#
+#   Priority: Slurpy args vs. chained actions
+#
+sub priority_a1 :PathPart('chained/priority_a') :Chained('/') :Args { }
+sub priority_a2 :PathPart('chained/priority_a') :Chained('/') :CaptureArgs(1) { }
+sub priority_a2_end :PathPart('end') :Chained('priority_a2') :Args(1) { }
+
+
+#
+#   Priority: Fixed args vs. chained actions
+#
+sub priority_b1 :PathPart('chained/priority_b') :Chained('/') :Args(3) { }
+sub priority_b2 :PathPart('chained/priority_b') :Chained('/') :CaptureArgs(1) { }
+sub priority_b2_end :PathPart('end') :Chained('priority_b2') :Args(1) { }
+
+#
+#   Priority: With no Args()
+#
+sub priority_c1 :PathPart('chained/priority_c') :Chained('/') :CaptureArgs(1) { }
+sub priority_c2 :PathPart('') :Chained('priority_c1') { }
+sub priority_c2_xyz :PathPart('xyz') :Chained('priority_c1')  { }
+
+
+#
+#   Optional specification of :Args in endpoint
+#
+sub opt_args :PathPart('chained/opt_args') :Chained('/') { }
+
+#
+#   Optional PathPart test -> /chained/optpp/*/opt_pathpart/*
+#
+sub opt_pp_start :Chained('/') :PathPart('chained/optpp') :CaptureArgs(1) { }
+sub opt_pathpart :Chained('opt_pp_start') :Args(1) { }
+
+#
+#   Optional Args *and* PathPart -> /chained/optall/*/oa/...
+#
+sub opt_all_start :Chained('/') :PathPart('chained/optall') :CaptureArgs(1) { }
+sub oa :Chained('opt_all_start') { }
+
+#
+#   :Chained is the same as :Chained('/')
+#
+sub rootdef :Chained :PathPart('chained/rootdef') :Args(1) { }
+
+#
+#   the ParentChain controller chains to this action by
+#   specifying :Chained('.')
+#
+sub parentchain :Chained('/') :PathPart('chained/parentchain') :CaptureArgs(1) { }
+
+#
+#   This is just for a test that a loose end is not callable
+#
+sub loose :Chained :PathPart('chained/loose') CaptureArgs(1) { }
+
+#
+#   Forwarding out of the middle of a chain.
+#
+sub chain_fw_a :Chained :PathPart('chained/chain_fw') :CaptureArgs(1) {
+    $_[1]->forward( '/action/chained/fw_dt_target' );
+}
+sub chain_fw_b :Chained('chain_fw_a') :PathPart('end') :Args(1) { }
+
+#
+#   Detaching out of the middle of a chain.
+#
+sub chain_dt_a :Chained :PathPart('chained/chain_dt') :CaptureArgs(1) {
+    $_[1]->detach( '/action/chained/fw_dt_target' );
+}
+sub chain_dt_b :Chained('chain_dt_a') :PathPart('end') :Args(1) { }
+
+#
+#   Target for former forward and chain tests.
+#
+sub fw_dt_target :Private { }
+
+#
+#   Test multiple chained actions with no captures
+#
+sub empty_chain_a : Chained('/')             PathPart('chained/empty') CaptureArgs(0) { }
+sub empty_chain_b : Chained('empty_chain_a') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_c : Chained('empty_chain_b') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_d : Chained('empty_chain_c') PathPart('')              CaptureArgs(1) { }
+sub empty_chain_e : Chained('empty_chain_d') PathPart('')              CaptureArgs(0) { }
+sub empty_chain_f : Chained('empty_chain_e') PathPart('')              Args(1)        { }
+
+sub mult_nopp_base  : Chained('/') PathPart('chained/mult_nopp') CaptureArgs(0) { }
+sub mult_nopp_all   : Chained('mult_nopp_base') PathPart('') Args(0) { }
+sub mult_nopp_new   : Chained('mult_nopp_base') PathPart('new') Args(0) { }
+sub mult_nopp_id    : Chained('mult_nopp_base') PathPart('') CaptureArgs(1) { }
+sub mult_nopp_idall : Chained('mult_nopp_id') PathPart('') Args(0) { }
+sub mult_nopp_idnew : Chained('mult_nopp_id') PathPart('new') Args(0) { }
+
+#
+#	Test Choice between branches and early return logic
+#   Declaration order is important for $children->{$*}, since this is first match best.
+#
+sub cc_base 	: Chained('/') 		 PathPart('chained/choose_capture') CaptureArgs(0) { }
+sub cc_link  	: Chained('cc_base') PathPart('') 						CaptureArgs(0) { }
+sub cc_anchor 	: Chained('cc_link') PathPart('anchor.html') 			Args(0) 	   { }
+sub cc_all     	: Chained('cc_base') PathPart('') 						Args() 		   { }
+
+sub cc_a		: Chained('cc_base') 	PathPart('') 	CaptureArgs(1) { }
+sub cc_a_link	: Chained('cc_a') 	 	PathPart('a') 	CaptureArgs(0) { }
+sub cc_a_anchor	: Chained('cc_a_link')  PathPart('') 	Args() 		   { }
+
+sub cc_b		: Chained('cc_base') 	PathPart('b') 				CaptureArgs(0) { }
+sub cc_b_link	: Chained('cc_b') 	 	PathPart('') 				CaptureArgs(1) { }
+sub cc_b_anchor	: Chained('cc_b_link')  PathPart('anchor.html') 	Args() 		   { }
+
+#
+#   Test static paths vs. captures
+#
+
+sub apan        : Chained('/')     CaptureArgs(0) PathPrefix   { }
+sub korv        : Chained('apan')  CaptureArgs(0) PathPart('') { }
+sub wurst       : Chained('apan')  CaptureArgs(1) PathPart('') { }
+sub static_end  : Chained('korv')  Args(0)                     { }
+sub capture_end : Chained('wurst') Args(0)        PathPart('') { }
+
+sub end :Private {
+  my ($self, $c) = @_;
+  return if $c->stash->{no_end};
+  my $out = join('; ', map { join(', ', @$_) }
+                         ($c->req->captures, $c->req->args));
+  $c->res->body($out);
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Chained.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Default.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Default.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Default.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::Controller::Action::Default;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Default.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Detach.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Detach.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Detach.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,45 @@
+package TestApp::Controller::Action::Detach;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->detach('two');
+    $c->forward('error');
+}
+
+sub two : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub error : Local {
+    my ( $self, $c ) = @_;
+    $c->res->output('error');
+}
+
+sub path : Local {
+    my ( $self, $c ) = @_;
+    $c->detach('/action/detach/two');
+    $c->forward('error');
+}
+
+sub with_args : Local {
+    my ( $self, $c, $orig ) = @_;
+    $c->detach( 'args', [qq/new/] );
+}
+
+sub with_method_and_args : Local {
+    my ( $self, $c, $orig ) = @_;
+    $c->detach( qw/TestApp::Controller::Action::Detach args/, [qq/new/] );
+}
+
+sub args : Local {
+    my ( $self, $c, $val ) = @_;
+    die "Expected argument 'new', got '$val'" unless $val eq 'new';
+    die "passed argument does not match args" unless $val eq $c->req->args->[0];
+    $c->res->body( $c->req->args->[0] );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Detach.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/End.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/End.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/End.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,15 @@
+package TestApp::Controller::Action::End;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/End.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Forward.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Forward.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Forward.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,93 @@
+package TestApp::Controller::Action::Forward;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('two');
+}
+
+sub two : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('three');
+}
+
+sub three : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( $self, 'four' );
+}
+
+sub four : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('/action/forward/five');
+}
+
+sub five : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('View::Dump::Request');
+}
+
+sub jojo : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('one');
+    $c->forward( $c->controller('Action::Forward'), 'three' );
+}
+
+sub inheritance : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('/action/inheritance/a/b/default');
+    $c->forward('five');
+}
+
+sub global : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('/global_action');
+}
+
+sub with_args : Local {
+    my ( $self, $c, $orig ) = @_;
+    $c->forward( 'args', [qq/new/] );
+    $c->res->body( $c->req->args->[0] );
+}
+
+sub with_method_and_args : Local {
+    my ( $self, $c, $orig ) = @_;
+    $c->forward( qw/TestApp::Controller::Action::Forward args/, [qq/new/] );
+    $c->res->body( $c->req->args->[0] );
+}
+
+sub args : Local {
+    my ( $self, $c, $val ) = @_;
+    die "Expected argument 'new', got '$val'" unless $val eq 'new';
+    die "passed argument does not match args" unless $val eq $c->req->args->[0];
+}
+
+sub args_embed_relative : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('embed/ok');
+}
+
+sub args_embed_absolute : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('/action/forward/embed/ok');
+}
+
+sub embed : Local {
+    my ( $self, $c, $ok ) = @_;
+
+    $ok ||= 'not ok';
+    $c->res->body($ok);
+}
+
+sub class_forward_test_action : Local {
+    my ( $self, $c ) = @_;
+    $c->forward(qw/TestApp class_forward_test_method/);
+}
+
+sub forward_to_uri_check : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( 'Action::ForwardTo', 'uri_check' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Forward.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/ForwardTo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/ForwardTo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/ForwardTo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::Controller::Action::ForwardTo;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub uri_check : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( $c->uri_for('foo/bar')->path );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/ForwardTo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Global.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Global.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Global.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,21 @@
+package TestApp::Controller::Action::Global;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub action_global_one : Action Absolute {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub action_global_two : Action Global {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub action_global_three : Action Path('/action_global_three') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Global.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Go.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Go.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Go.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,90 @@
+package TestApp::Controller::Action::Go;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->go('two');
+}
+
+sub two : Private {
+    my ( $self, $c ) = @_;
+    $c->go('three');
+}
+
+sub three : Local {
+    my ( $self, $c ) = @_;
+    $c->go( $self, 'four' );
+}
+
+sub four : Private {
+    my ( $self, $c ) = @_;
+    $c->go('/action/go/five');
+}
+
+sub five : Local {
+    my ( $self, $c ) = @_;
+    $c->go('View::Dump::Request');
+}
+
+sub inheritance : Local {
+    my ( $self, $c ) = @_;
+    $c->go('/action/inheritance/a/b/default');
+}
+
+sub global : Local {
+    my ( $self, $c ) = @_;
+    $c->go('/global_action');
+}
+
+sub with_args : Local {
+    my ( $self, $c, $arg ) = @_;
+    $c->go( 'args', [$arg] );
+}
+
+sub with_method_and_args : Local {
+    my ( $self, $c, $arg ) = @_;
+    $c->go( qw/TestApp::Controller::Action::Go args/, [$arg] );
+}
+
+sub args : Local {
+    my ( $self, $c, $val ) = @_;
+    die "passed argument does not match args" unless $val eq $c->req->args->[0];
+    $c->res->body($val);
+}
+
+sub go_die : Local {
+    my ( $self, $c, $val ) = @_;
+    eval { $c->go( 'args', [qq/new/] ) };
+    $c->res->body( $@ ? $@ : "go() did not die" );
+    die $Catalyst::GO;
+}
+
+sub go_chained : Local {
+    my ( $self, $c, $val ) = @_;
+    $c->go('/action/chained/foo/spoon',[1]);
+}
+
+sub args_embed_relative : Local {
+    my ( $self, $c ) = @_;
+    $c->go('embed/ok');
+}
+
+sub args_embed_absolute : Local {
+    my ( $self, $c ) = @_;
+    $c->go('/action/go/embed/ok');
+}
+
+sub embed : Local {
+    my ( $self, $c, $ok ) = @_;
+    $ok ||= 'not ok';
+    $c->res->body($ok);
+}
+
+sub class_go_test_action : Local {
+    my ( $self, $c ) = @_;
+    $c->go(qw/TestApp class_go_test_method/);
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Go.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::Controller::Action::Index;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'Action-Index index' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Inheritance.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Inheritance.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Inheritance.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,74 @@
+package TestApp::Controller::Action::Inheritance;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 1;
+}
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $self->SUPER::begin($c);
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+}
+
+package TestApp::Controller::Action::Inheritance::A;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 1;
+}
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $self->SUPER::begin($c);
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+}
+
+package TestApp::Controller::Action::Inheritance::A::B;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 1;
+}
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $self->SUPER::begin($c);
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+}
+
+1;
+


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Inheritance.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Local.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Local.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Local.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,26 @@
+package TestApp::Controller::Action::Local;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub one : Action Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub two : Action Local Args(2) {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub three : Action Path('three') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub four : Action Path('four/five/six') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Local.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Path.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Path.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Path.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,38 @@
+package TestApp::Controller::Action::Path;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+__PACKAGE__->config(
+    actions => {
+      'one' => { 'Path' => [ 'a path with spaces' ] },
+      'two' => { 'Path' => "åäö" },
+    },
+);
+
+sub one : Action Path("this_will_be_overriden") {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub two : Action {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub three :Path {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub four : Path( 'spaces_near_parens_singleq' ) {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub five : Path( "spaces_near_parens_doubleq" ) {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Path.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Private.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Private.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Private.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,36 @@
+package TestApp::Controller::Action::Private;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->output('access denied');
+}
+
+sub one : Private { 
+    my ( $self, $c ) = @_;
+    $c->res->output('access allowed');
+}
+
+sub two : Private Relative {
+    my ( $self, $c ) = @_;
+    $c->res->output('access allowed');
+}
+
+sub three : Private Absolute {
+    my ( $self, $c ) = @_;
+    $c->res->output('access allowed');
+}
+
+sub four : Private Path('/action/private/four') {
+    my ( $self, $c ) = @_;
+    $c->res->output('access allowed');
+}
+
+sub five : Private Path('five') {
+    my ( $self, $c ) = @_;
+    $c->res->output('access allowed');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Private.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Regexp.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Regexp.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Regexp.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,21 @@
+package TestApp::Controller::Action::Regexp;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub one : Action Regex('^action/regexp/(\w+)/(\d+)$') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub two : Action LocalRegexp('^(\d+)/(\w+)$') {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub three : Action LocalRegex('^(mandatory)(/optional)?$'){
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Regexp.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Streaming.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Streaming.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Streaming.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,30 @@
+package TestApp::Controller::Action::Streaming;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub streaming : Global {
+    my ( $self, $c ) = @_;
+    for my $line ( split "\n", <<'EOF' ) {
+foo
+bar
+baz
+EOF
+        $c->res->write("$line\n");
+    }
+}
+
+sub body : Local {
+    my ( $self, $c ) = @_;
+    
+    my $file = "$FindBin::Bin/01use.t";
+    my $fh = IO::File->new( $file, 'r' );
+    if ( defined $fh ) {
+        $c->res->body( $fh );
+    }
+    else {
+        $c->res->body( "Unable to read $file" );
+    }
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/Streaming.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestMultipath.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestMultipath.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestMultipath.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,21 @@
+package TestApp::Controller::Action::TestMultipath;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+__PACKAGE__->config(
+  namespace => 'action/multipath'
+);
+
+sub multipath : Local : Global : Path('/multipath1') : Path('multipath2') {
+    my ( $self, $c ) = @_;
+    for my $line ( split "\n", <<'EOF' ) {
+foo
+bar
+baz
+EOF
+        $c->res->write("$line\n");
+    }
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestMultipath.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestRelative.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestRelative.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestRelative.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,29 @@
+package TestApp::Controller::Action::TestRelative;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+__PACKAGE__->config(
+  path => 'action/relative'
+);
+
+sub relative : Local {
+    my ( $self, $c ) = @_;
+    $c->forward('/action/forward/one');
+}
+
+sub relative_two : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( 'TestApp::Controller::Action::Forward', 'one' );
+}
+
+sub relative_go : Local {
+    my ( $self, $c ) = @_;
+    $c->go('/action/go/one');
+}
+
+sub relative_go_two : Local {
+    my ( $self, $c ) = @_;
+    $c->go( 'TestApp::Controller::Action::Go', 'one' );
+}
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action/TestRelative.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,18 @@
+package TestApp::Controller::Action;
+
+use strict;
+use base 'Catalyst::Controller';
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $c->res->header( 'X-Test-Class' => ref($self) );
+    $c->response->content_type('text/plain; charset=utf-8');
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->output("Error - TestApp::Controller::Action\n");
+    $c->res->status(404);
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Action.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Args.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Args.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Args.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Args;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub args :Local  {
+    my ( $self, $c ) = @_;
+    $c->res->body( join('',@{$c->req->args}) );
+}
+
+sub params :Local {
+    my ( $self, $c ) = splice @_, 0, 2;
+    $c->res->body( join('', at _) );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Args.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Dump.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Dump.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Dump.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,32 @@
+package TestApp::Controller::Dump;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub default : Action Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump');
+}
+
+sub env : Action Relative {
+    my ( $self, $c ) = @_;
+    $c->stash( env => \%ENV );
+    $c->forward('TestApp::View::Dump');
+}
+
+sub parameters : Action Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Parameters');
+}
+
+sub request : Action Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub response : Action Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Response');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Dump.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Auth.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Auth.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Auth.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,12 @@
+package TestApp::Controller::Engine::Request::Auth;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Auth.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/URI.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/URI.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/URI.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,102 @@
+package TestApp::Controller::Engine::Request::URI;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub change_path : Local {
+    my ( $self, $c ) = @_;
+    
+    # change the path
+    $c->req->path( '/my/app/lives/here' );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub change_base : Local {
+    my ( $self, $c ) = @_;
+    
+    # change the base and uri paths
+    $c->req->base->path( '/new/location' );
+    $c->req->uri->path( '/new/location/engine/request/uri/change_base' );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with : Local {
+    my ( $self, $c ) = @_;
+
+    # change the current uri
+    my $uri   = $c->req->uri_with( { b => 1 } );
+    my %query = $uri->query_form;
+    
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );
+    $c->res->header( 'X-Catalyst-Param-b' => $query{ b } );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_object : Local {
+    my ( $self, $c ) = @_;
+
+    my $uri   = $c->req->uri_with( { a => $c->req->base } );
+    my %query = $uri->query_form;
+    
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_utf8 : Local {
+    my ( $self, $c ) = @_;
+
+    # change the current uri
+    my $uri = $c->req->uri_with( { unicode => "\x{2620}" } );
+    
+    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_undef : Local {
+    my ( $self, $c ) = @_;
+
+    my $warnings = 0;
+    local $SIG{__WARN__} = sub { $warnings++ };
+
+    # change the current uri
+    my $uri = $c->req->uri_with( { foo => undef } );
+    
+    $c->res->header( 'X-Catalyst-warnings' => $warnings );
+    
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_undef_only : Local {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri_with( { a => undef } );
+    
+    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub uri_with_undef_ignore : Local {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri_with( { a => 1, b => undef } );
+    
+    my %query = $uri->query_form;
+    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );
+    $c->res->header( 'X-Catalyst-Param-b' => $query{ b } );
+    $c->res->header( 'X-Catalyst-Param-c' => $query{ c } );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/URI.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Uploads.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Uploads.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Uploads.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,12 @@
+package TestApp::Controller::Engine::Request::Uploads;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub slurp : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->content_type('text/plain; charset=utf-8');
+    $c->response->output( $c->request->upload('slurp')->slurp );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Request/Uploads.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Cookies.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Cookies.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Cookies.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,35 @@
+package TestApp::Controller::Engine::Response::Cookies;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
+    $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub two : Local {
+    my ( $self, $c ) = @_;
+    $c->res->cookies->{catalyst} = { value => 'cool',     path => '/bah' };
+    $c->res->cookies->{cool}     = { value => 'catalyst', path => '/' };
+    $c->res->redirect('http://www.google.com/');
+}
+
+sub three : Local {
+    my ( $self, $c ) = @_;
+
+    $c->res->cookies->{object} = CGI::Simple::Cookie->new(
+        -name => "this_is_the_real_name",
+        -value => [qw/foo bar/],
+    );
+
+    $c->res->cookies->{hash} = {
+        value => [qw/a b c/],
+    };
+
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Cookies.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Errors.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Errors.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Errors.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,23 @@
+package TestApp::Controller::Engine::Response::Errors;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Relative {
+    my ( $self, $c ) = @_;
+    my $a = 0;
+    my $b = 0;
+    my $t = $a / $b;
+}
+
+sub two : Relative {
+    my ( $self, $c ) = @_;
+    $c->forward('/non/existing/path');
+}
+
+sub three : Relative {
+    my ( $self, $c ) = @_;
+    die("I'm going to die!\n");
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Errors.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Headers.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Headers.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Headers.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,14 @@
+package TestApp::Controller::Engine::Response::Headers;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->header( 'X-Header-Catalyst' => 'Cool' );
+    $c->res->header( 'X-Header-Cool'     => 'Catalyst' );
+    $c->res->header( 'X-Header-Numbers'  => join ', ', 1 .. 10 );
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Headers.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Large.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Large.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Large.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Engine::Response::Large;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->output( 'x' x (100 * 1024) ); 
+}
+
+sub two : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->output( 'y' x (1024 * 1024) );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Large.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Redirect.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Redirect.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Redirect.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,29 @@
+package TestApp::Controller::Engine::Response::Redirect;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub one : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('/test/writing/is/boring');
+}
+
+sub two : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+}
+
+sub three : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+    $c->response->status(301); # Moved Permanently
+}
+
+sub four : Relative {
+    my ( $self, $c ) = @_;
+    $c->response->redirect('http://www.google.com/');
+    $c->response->status(307); # Temporary Redirect
+}
+
+1;
+


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Redirect.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Status.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Status.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Status.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,42 @@
+package TestApp::Controller::Engine::Response::Status;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub begin : Private {
+    my ( $self, $c ) = @_;
+    $c->response->content_type('text/plain');
+    return 1;
+}
+
+sub s200 : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->status(200);
+    $c->res->output("200 OK\n");
+}
+
+sub s400 : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->status(400);
+    $c->res->output("400 Bad Request\n");
+}
+
+sub s403 : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->status(403);
+    $c->res->output("403 Forbidden\n");
+}
+
+sub s404 : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->status(404);
+    $c->res->output("404 Not Found\n");
+}
+
+sub s500 : Relative {
+    my ( $self, $c ) = @_;
+    $c->res->status(500);
+    $c->res->output("500 Internal Server Error\n");
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Engine/Response/Status.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Fork.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Fork.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Fork.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,60 @@
+#!/usr/bin/perl
+# Fork.pm 
+# Copyright (c) 2006 Jonathan Rockway <jrockway at cpan.org>
+
+package TestApp::Controller::Fork;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use YAML;
+
+sub system : Local {
+    my ($self, $c, $ls) = @_;
+    my ($result, $code) = (undef, 1);
+
+    if(!-e $ls || !-x _){ 
+        $result = 'skip';
+    }
+    else {
+        $result = system($ls, $ls, $ls);
+        $result = $! if $result != 0;
+    }
+    
+    $c->response->body(Dump({result => $result}));
+}
+
+sub backticks : Local {
+    my ($self, $c, $ls) = @_;
+    my ($result, $code) = (undef, 1);
+    
+    if(!-e $ls || !-x _){ 
+        $result = 'skip';
+        $code = 0;
+    }
+    else {
+        $result = `$ls $ls $ls` || $!;
+        $code = $?;
+    }
+    
+    $c->response->body(Dump({result => $result, code => $code}));
+}
+
+sub fork : Local {
+    my ($self, $c) = @_;
+    my $pid;
+    my $x = 0;
+    
+    if($pid = fork()){
+        $x = "ok";
+    }
+    else {
+        exit(0);
+    }
+
+    waitpid $pid,0 or die;
+    
+    $c->response->body(Dump({pid => $pid, result => $x}));
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Fork.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::Controller::Index;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'Index index' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/MultiMethod.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/MultiMethod.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/MultiMethod.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,19 @@
+package TestApp::Controller::Priorities::MultiMethod;
+
+use strict;
+use warnings;
+use base qw/Catalyst::Controller/;
+
+sub auto :Private {
+    my ($self, $c) = @_;
+    $c->res->body(join(' ', $c->action->name, @{$c->req->args}));
+    return 1;
+}
+
+sub zero :Path :Args(0) { }
+
+sub one :Path :Args(1) { }
+
+sub two :Path :Args(2) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/MultiMethod.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/loc_vs_index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/loc_vs_index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/loc_vs_index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,8 @@
+package TestApp::Controller::Priorities::loc_vs_index;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub index :Private { $_[1]->res->body( 'index' ) }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/loc_vs_index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/locre_vs_index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/locre_vs_index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/locre_vs_index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,8 @@
+package TestApp::Controller::Priorities::locre_vs_index;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub index :Private { $_[1]->res->body( 'index' ) }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/locre_vs_index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/path_vs_index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/path_vs_index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/path_vs_index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,8 @@
+package TestApp::Controller::Priorities::path_vs_index;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub index :Private { $_[1]->res->body( 'index' ) }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/path_vs_index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/re_vs_index.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/re_vs_index.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/re_vs_index.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,8 @@
+package TestApp::Controller::Priorities::re_vs_index;
+
+use strict;
+use base 'Catalyst::Base';
+
+sub index :Private { $_[1]->res->body( 'index' ) }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities/re_vs_index.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,75 @@
+package TestApp::Controller::Priorities;
+
+use strict;
+use base 'Catalyst::Base';
+
+#
+#   Regex vs. Local
+#
+
+sub re_vs_loc_re :Regex('/priorities/re_vs_loc') { $_[1]->res->body( 'regex' ) }
+sub re_vs_loc    :Local                          { $_[1]->res->body( 'local' ) }
+
+#
+#   Regex vs. LocalRegex
+#
+
+sub re_vs_locre_locre :LocalRegex('re_vs_(locre)')      { $_[1]->res->body( 'local_regex' ) }
+sub re_vs_locre_re    :Regex('/priorities/re_vs_locre') { $_[1]->res->body( 'regex' ) }
+
+#
+#   Regex vs. Path
+#
+
+sub re_vs_path_path :Path('/priorities/re_vs_path')  { $_[1]->res->body( 'path' ) }
+sub re_vs_path_re   :Regex('/priorities/re_vs_path') { $_[1]->res->body( 'regex' ) }
+
+#
+#   Local vs. LocalRegex
+#
+
+sub loc_vs_locre_locre :LocalRegex('loc_vs_locre') { $_[1]->res->body( 'local_regex' ) }
+sub loc_vs_locre       :Local                      { $_[1]->res->body( 'local' ) }
+
+#
+#   Local vs. Path (depends on definition order)
+#
+
+sub loc_vs_path1_loc :Path('/priorities/loc_vs_path1') { $_[1]->res->body( 'path' ) }
+sub loc_vs_path1     :Local                            { $_[1]->res->body( 'local' ) }
+
+sub loc_vs_path2     :Local                            { $_[1]->res->body( 'local' ) }
+sub loc_vs_path2_loc :Path('/priorities/loc_vs_path2') { $_[1]->res->body( 'path' ) }
+
+#
+#   Path vs. LocalRegex
+#
+
+sub path_vs_locre_locre :LocalRegex('path_vs_(locre)')     { $_[1]->res->body( 'local_regex' ) }
+sub path_vs_locre_path  :Path('/priorities/path_vs_locre') { $_[1]->res->body( 'path' ) }
+
+#
+#   Regex vs. index (has sub controller)
+#
+
+sub re_vs_idx :Regex('/priorities/re_vs_index') { $_[1]->res->body( 'regex' ) }
+
+#
+#   Local vs. index (has sub controller)
+#
+
+sub loc_vs_index :Local { $_[1]->res->body( 'local' ) }
+
+#
+#   LocalRegex vs. index (has sub controller)
+#
+
+sub locre_vs_idx :LocalRegex('locre_vs_index') { $_[1]->res->body( 'local_regex' ) }
+
+#
+#   Path vs. index (has sub controller)
+#
+
+sub path_vs_idx :Path('/priorities/path_vs_index') { $_[1]->res->body( 'path' ) }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Priorities.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Root.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Root.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,23 @@
+package TestApp::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub chain_root_index : Chained('/') PathPart('') Args(0) { }
+
+sub zero : Path('0') {
+    my ( $self, $c ) = @_;
+    $c->res->header( 'X-Test-Class' => ref($self) );
+    $c->response->content_type('text/plain; charset=utf-8');
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub localregex : LocalRegex('^localregex$') {
+    my ( $self, $c ) = @_;
+    $c->res->header( 'X-Test-Class' => ref($self) );
+    $c->response->content_type('text/plain; charset=utf-8');
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Controller/Root.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/Bar.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/Bar.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/Bar.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,5 @@
+package TestApp::Model::Foo::Bar;
+
+sub model_foo_bar_method_from_foo_bar { "model_foo_bar_method_from_foo_bar" }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo/Bar.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,16 @@
+package TestApp::Model::Foo;
+
+use strict;
+use warnings;
+
+use base qw/ Catalyst::Model /;
+
+sub model_foo_method { 1 }
+
+package TestApp::Model::Foo::Bar;
+sub model_foo_bar_method_from_foo { 1 }
+
+package TestApp::Model::Foo;
+sub bar { "TestApp::Model::Foo::Bar" }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Model/Foo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/FullyQualified.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/FullyQualified.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/FullyQualified.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,13 @@
+package TestApp::Plugin::FullyQualified;
+
+use strict;
+
+sub fully_qualified {
+    my $c = shift;
+
+    $c->stash->{fully_qualified} = 1;
+
+    return $c;
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/Plugin/FullyQualified.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Parameters.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Parameters.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Parameters.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::View::Dump::Parameters;
+
+use strict;
+use base 'TestApp::View::Dump';
+
+sub process {
+    my ( $self, $c ) = @_;
+    return $self->SUPER::process( $c, $c->req->parameters );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Parameters.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Request.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Request.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Request.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::View::Dump::Request;
+
+use strict;
+use base qw[TestApp::View::Dump];
+
+sub process {
+    my ( $self, $c ) = @_;
+    return $self->SUPER::process( $c, $c->request );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Request.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Response.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Response.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Response.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestApp::View::Dump::Response;
+
+use strict;
+use base qw[TestApp::View::Dump];
+
+sub process {
+    my ( $self, $c ) = @_;
+    return $self->SUPER::process( $c, $c->response );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump/Response.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,57 @@
+package TestApp::View::Dump;
+
+use strict;
+use base 'Catalyst::Base';
+
+use Data::Dumper ();
+use Scalar::Util qw(weaken);
+
+sub dump {
+    my ( $self, $reference ) = @_;
+
+    return unless $reference;
+
+    my $dumper = Data::Dumper->new( [$reference] );
+    $dumper->Indent(1);
+    $dumper->Purity(1);
+    $dumper->Useqq(0);
+    $dumper->Deepcopy(1);
+    $dumper->Quotekeys(0);
+    $dumper->Terse(1);
+
+    return $dumper->Dump;
+}
+
+sub process {
+    my ( $self, $c, $reference ) = @_;
+
+    # Force processing of on-demand data
+    $c->prepare_body;
+
+    # Remove context from reference if needed
+    my $context = delete $reference->{_context};
+
+    # Remove body from reference if needed
+    my $body = delete $reference->{_body};
+
+    if ( my $output =
+        $self->dump( $reference || $c->stash->{dump} || $c->stash ) )
+    {
+
+        $c->res->headers->content_type('text/plain');
+        $c->res->output($output);
+
+        # Repair context
+        $reference->{_context} = $context;
+        weaken( $reference->{_context} );
+
+        # Repair body
+        $reference->{_body} = $body;
+
+        return 1;
+    }
+
+    return 0;
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp/View/Dump.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,106 @@
+package TestApp;
+
+use strict;
+use Catalyst qw/
+    Test::Errors 
+    Test::Headers 
+    Test::Plugin
+    Test::Inline
+    +TestApp::Plugin::FullyQualified
+/;
+use Catalyst::Utils;
+
+our $VERSION = '0.01';
+
+TestApp->config( name => 'TestApp', root => '/some/dir' );
+
+TestApp->setup;
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body('root index');
+}
+
+sub global_action : Private {
+    my ( $self, $c ) = @_;
+    $c->forward('TestApp::View::Dump::Request');
+}
+
+sub execute {
+    my $c      = shift;
+    my $class  = ref( $c->component( $_[0] ) ) || $_[0];
+    my $action = "$_[1]";
+
+    my $method;
+
+    if ( $action =~ /->(\w+)$/ ) {
+        $method = $1;
+    }
+    elsif ( $action =~ /\/(\w+)$/ ) {
+        $method = $1;
+    }
+    elsif ( $action =~ /^(\w+)$/ ) {
+        $method = $action;
+    }
+
+    if ( $class && $method && $method !~ /^_/ ) {
+        my $executed = sprintf( "%s->%s", $class, $method );
+        my @executed = $c->response->headers->header('X-Catalyst-Executed');
+        push @executed, $executed;
+        $c->response->headers->header(
+            'X-Catalyst-Executed' => join ', ',
+            @executed
+        );
+    }
+
+    return $c->SUPER::execute(@_);
+}
+
+# Replace the very large HTML error page with
+# useful info if something crashes during a test
+sub finalize_error {
+    my $c = shift;
+    
+    $c->NEXT::finalize_error(@_);
+    
+    $c->res->status(500);
+    $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
+}
+
+sub class_forward_test_method :Private {
+    my ( $self, $c ) = @_;
+    $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
+}
+
+sub class_go_test_method :Private {
+    my ( $self, $c ) = @_;
+    $c->response->headers->header( 'X-Class-Go-Test-Method' => 1 );
+}
+
+sub loop_test : Local {
+    my ( $self, $c ) = @_;
+
+    for( 1..1001 ) {
+        $c->forward( 'class_forward_test_method' );
+    }
+}
+
+sub recursion_test : Local {
+    my ( $self, $c ) = @_;
+    $c->forward( 'recursion_test' );
+}
+
+{
+    no warnings 'redefine';
+    sub Catalyst::Log::error { }
+}
+
+# Make sure we can load Inline plugins. 
+
+package Catalyst::Plugin::Test::Inline;
+
+use strict;
+
+use base qw/Catalyst::Base Class::Data::Inheritable/;
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestApp.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/Foo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/Foo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/Foo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,10 @@
+package TestAppChainedAbsolutePathPart::Controller::Foo;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+sub foo : Chained PathPart('/foo/bar') Args(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart/Controller/Foo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,20 @@
+package TestAppChainedAbsolutePathPart;
+
+use strict;
+use Catalyst qw/
+    Test::Errors 
+    Test::Headers 
+/;
+use Catalyst::Utils;
+
+our $VERSION = '0.01';
+
+TestAppChainedAbsolutePathPart
+    ->config( 
+        name => 'TestAppChainedAbsolutePathPart',
+        root => '/some/dir'
+    );
+
+TestAppChainedAbsolutePathPart->setup;
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedAbsolutePathPart.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/Foo.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/Foo.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/Foo.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,11 @@
+package TestAppChainedRecursive::Controller::Foo;
+
+use strict;
+use warnings;
+
+use base qw/Catalyst::Controller/;
+
+sub foo : Chained('bar') CaptureArgs(1) { }
+sub bar : Chained('foo') CaptureArgs(1) { }
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive/Controller/Foo.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,19 @@
+package TestAppChainedRecursive;
+
+use strict;
+use Catalyst qw/
+    Test::Errors 
+    Test::Headers 
+/;
+use Catalyst::Utils;
+
+our $VERSION = '0.01';
+
+TestAppChainedRecursive->config(
+    name => 'TestAppChainedRecursive',
+    root => '/some/dir'
+);
+
+TestAppChainedRecursive->setup;
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppChainedRecursive.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppDoubleAutoBug.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppDoubleAutoBug.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,59 @@
+use strict;
+use warnings;
+
+package TestAppDoubleAutoBug;
+
+use Catalyst qw/
+    Test::Errors
+    Test::Headers
+    Test::Plugin
+/;
+
+our $VERSION = '0.01';
+
+__PACKAGE__->config( name => 'TestAppDoubleAutoBug', root => '/some/dir' );
+
+__PACKAGE__->setup;
+
+sub execute {
+    my $c      = shift;
+    my $class  = ref( $c->component( $_[0] ) ) || $_[0];
+    my $action = "$_[1]";
+
+    my $method;
+
+    if ( $action =~ /->(\w+)$/ ) {
+        $method = $1;
+    }
+    elsif ( $action =~ /\/(\w+)$/ ) {
+        $method = $1;
+    }
+    elsif ( $action =~ /^(\w+)$/ ) {
+        $method = $action;
+    }
+
+    if ( $class && $method && $method !~ /^_/ ) {
+        my $executed = sprintf( "%s->%s", $class, $method );
+        my @executed = $c->response->headers->header('X-Catalyst-Executed');
+        push @executed, $executed;
+        $c->response->headers->header(
+            'X-Catalyst-Executed' => join ', ',
+            @executed
+        );
+    }
+
+    return $c->SUPER::execute(@_);
+}
+
+
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    ++$c->stash->{auto_count};
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
+}


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppDoubleAutoBug.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/Body.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/Body.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/Body.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,29 @@
+package TestAppOnDemand::Controller::Body;
+
+use strict;
+use base 'Catalyst::Base';
+
+use Data::Dump ();
+
+sub params : Local {
+    my ( $self, $c ) = @_;
+
+    $c->res->body( Data::Dump::dump( $c->req->body_parameters ) );
+}
+
+sub read : Local {
+    my ( $self, $c ) = @_;
+    
+    # read some data
+    my @chunks;
+    
+    while ( my $data = $c->read( 10_000 ) ) {
+        push @chunks, $data;
+    }
+
+    $c->res->content_type( 'text/plain');
+    
+    $c->res->body( join ( '|', map { length $_ } @chunks ) );
+}
+
+1;
\ No newline at end of file


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand/Controller/Body.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,20 @@
+package TestAppOnDemand;
+
+use strict;
+use Catalyst qw/
+    Test::Errors 
+    Test::Headers 
+/;
+use Catalyst::Utils;
+
+our $VERSION = '0.01';
+
+__PACKAGE__->config(
+    name            => __PACKAGE__,
+    root            => '/some/dir',
+    parse_on_demand => 1,
+);
+
+__PACKAGE__->setup;
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppOnDemand.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppPathBug.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppPathBug.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppPathBug.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+package TestAppPathBug;
+
+use Catalyst;
+
+our $VERSION = '0.01';
+
+__PACKAGE__->config( name => 'TestAppPathBug', root => '/some/dir' );
+
+__PACKAGE__->setup;
+
+sub foo : Path {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'This is the foo method.' );
+}
+
+1;


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppPathBug.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppStats.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppStats.pm	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppStats.pm	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+package TestAppStats;
+
+use Catalyst qw/
+    -Stats=1
+/;
+
+our $VERSION = '0.01';
+our @log_messages;
+
+__PACKAGE__->config( name => 'TestAppStats', root => '/some/dir' );
+
+__PACKAGE__->log(TestAppStats::Log->new);
+
+__PACKAGE__->setup;
+
+# Return log messages from previous request
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->stats->profile("test");
+    $c->res->body(join("\n", @log_messages));
+    @log_messages = ();
+}
+
+package TestAppStats::Log;
+use base qw/Catalyst::Log/;
+
+sub info { push(@log_messages, @_); }
+sub debug { push(@log_messages, @_); }


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/lib/TestAppStats.pm
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_chained.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_chained.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_chained.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 124*$iters;
+use Test::More tests => 141*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -528,6 +528,86 @@
     }
 
     #
+    #   Test if :Chained('../act') is working
+    #
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained->one
+          TestApp::Controller::Action::Chained::ParentChain->chained_rel
+          TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/chained/one/1/chained_rel/3/2'),
+            ":Chained('../action') chains to correct action" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, '1; 3, 2', 'Content OK' );
+    }
+
+    #
+    #   Test if ../ works to go up more than one level
+    #
+    {
+        my @expected = qw[
+            TestApp::Controller::Action::Chained->begin
+            TestApp::Controller::Action::Chained->one
+            TestApp::Controller::Action::Chained::ParentChain::Relative->chained_rel_two
+            TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/chained/one/1/chained_rel_two/42/23'),
+            "../ works to go up more than one level" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, '1; 42, 23', 'Content OK' );
+    }
+
+    #
+    #   Test if :ChainedParent is working
+    #
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained->loose
+          TestApp::Controller::Action::Chained::ParentChain->loose
+          TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/chained/loose/4/loose/a/b'),
+            ":Chained('../action') chains to correct action" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, '4; a, b', 'Content OK' );
+    }
+
+    #
+    #   Test if :Chained('../name/act') is working
+    #
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained::Bar->cross1
+          TestApp::Controller::Action::Chained::ParentChain->up_down
+          TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/chained/cross/4/up_down/5'),
+            ":Chained('../action') chains to correct action" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, '4; 5', 'Content OK' );
+    }
+
+    #
     #   Test behaviour of auto actions returning '1' for the chain.
     #
     {
@@ -863,4 +943,42 @@
     
     }
 
+    #
+    #   PathPrefix
+    #
+    {
+        my @expected = qw[
+          TestApp::Controller::Action::Chained->begin
+          TestApp::Controller::Action::Chained::PathPrefix->instance
+          TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/action/chained/pathprefix/1'),
+            "PathPrefix (as an endpoint)" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+        is( $response->content, '; 1', 'Content OK' );
+    }
+
+    #
+    #   static paths vs. captures
+    #
+    {
+        my @expected = qw[
+            TestApp::Controller::Action::Chained->begin
+            TestApp::Controller::Action::Chained->apan
+            TestApp::Controller::Action::Chained->korv
+            TestApp::Controller::Action::Chained->static_end
+            TestApp::Controller::Action::Chained->end
+        ];
+
+        my $expected = join( ", ", @expected );
+
+        ok( my $response = request('http://localhost/action/chained/static_end'),
+            "static paths are prefered over captures" );
+        is( $response->header('X-Catalyst-Executed'),
+            $expected, 'Executed actions' );
+    }
 }

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_forward.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_forward.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_forward.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 47 * $iters;
+use Test::More tests => 50 * $iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -235,4 +235,14 @@
             'Test Method' );
     }
 
+    # test uri_for re r7385
+    {
+        ok( my $response = request(
+            'http://localhost/action/forward/forward_to_uri_check'),
+            'forward_to_uri_check request');
+
+        ok( $response->is_success, 'forward_to_uri_check successful');
+        is( $response->content, '/action/forward/foo/bar',
+             'forward_to_uri_check correct namespace');
+    }
 }

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_path.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_path.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_path.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -4,13 +4,13 @@
 use warnings;
 
 use FindBin;
-use lib "$FindBin::Bin/lib";
+use lib "$FindBin::Bin/../lib";
 
 our $iters;
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 30*$iters;
+use Test::More tests => 36*$iters;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -124,4 +124,22 @@
             'Content is a serialized Catalyst::Request'
         );
     }
+
+    {
+        ok( my $response = request('http://localhost/0'), 'Request' );
+        ok( $response->is_success, 'Response Successful 2xx' );
+        is( $response->content_type, 'text/plain', 'Response Content-Type' );
+        is( $response->header('X-Catalyst-Action'),
+            '0', 'Test Action' );
+        is(
+            $response->header('X-Test-Class'),
+            'TestApp::Controller::Root',
+            'Test Class'
+        );
+        like(
+            $response->content,
+            qr/^bless\( .* 'Catalyst::Request' \)$/s,
+            'Content is a serialized Catalyst::Request'
+        );
+    }
 }

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_regexp.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_regexp.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_component_controller_action_regexp.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -10,7 +10,7 @@
 
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
-use Test::More tests => 28*$iters;
+use Test::More tests => 33*$iters;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -103,4 +103,19 @@
         is( $req->captures->[ 0 ], 'mandatory', 'mandatory capture' );
         is( $req->captures->[ 1 ], '/optional', 'optional capture' );
     }
+
+    # test localregex in the root controller
+    {
+        ok( my $response = request('http://localhost/localregex'),
+            'Request' );
+        ok( $response->is_success, 'Response Successful 2xx' );
+        is( $response->content_type, 'text/plain', 'Response Content-Type' );
+        is( $response->header('X-Catalyst-Action'),
+            '^localregex$', 'Test Action' );
+        is(
+            $response->header('X-Test-Class'),
+            'TestApp::Controller::Root',
+            'Test Class'
+        );
+    }
 }

Added: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_auth.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_auth.t	                        (rev 0)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_auth.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -0,0 +1,43 @@
+#!perl
+
+# This tests to make sure the Authorization header is passed through by the engine.
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 7;
+use Catalyst::Test 'TestApp';
+
+use Catalyst::Request;
+use HTTP::Headers;
+use HTTP::Request::Common;
+
+{
+    my $creq;
+
+    my $request = GET(
+        'http://localhost/dump/request',
+        'Authorization' => 'Basic dGVzdDoxMjM0NQ==',
+    );
+
+    ok( my $response = request($request), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->content_type, 'text/plain', 'Response Content-Type' );
+    like( $response->content, qr/'Catalyst::Request'/,
+        'Content is a serialized Catalyst::Request' );
+
+    {
+        no strict 'refs';
+        ok(
+            eval '$creq = ' . $response->content,
+            'Unserialize Catalyst::Request'
+        );
+    }
+
+    isa_ok( $creq, 'Catalyst::Request' );
+    
+    is( $creq->header('Authorization'), 'Basic dGVzdDoxMjM0NQ==', 'auth header ok' );
+}


Property changes on: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_auth.t
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_parameters.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_parameters.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_parameters.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -6,7 +6,7 @@
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
-use Test::More tests => 40;
+use Test::More tests => 53;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -137,3 +137,26 @@
     ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
     is( $creq->{uri}->query, 'x=1&y=1&z=1', 'Catalyst::Request GET query_string' );
 }
+
+{
+    my $creq;
+    ok( my $response = request("http://localhost/dump/request?&&q="),
+        'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->content_type, 'text/plain', 'Response Content-Type' );
+    ok( eval '$creq = ' . $response->content );
+    is( keys %{$creq->{parameters}}, 1, 'remove empty parameter' );
+    is( $creq->{parameters}->{q}, '', 'empty parameter' );
+}
+
+{
+    my $creq;
+    ok( my $response = request("http://localhost/dump/request?&0&q="),
+        'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->content_type, 'text/plain', 'Response Content-Type' );
+    ok( eval '$creq = ' . $response->content );
+    is( keys %{$creq->{parameters}}, 2, 'remove empty parameter' );
+    is( $creq->{parameters}->{q}, '', 'empty parameter' );
+    ok( !defined $creq->{parameters}->{0}, 'empty parameter' );
+}

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uploads.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uploads.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uploads.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -6,7 +6,7 @@
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
-use Test::More tests => 75;
+use Test::More tests => 88;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -14,6 +14,7 @@
 use HTTP::Headers;
 use HTTP::Headers::Util 'split_header_words';
 use HTTP::Request::Common;
+use Path::Class::Dir;
 
 {
     my $creq;
@@ -71,7 +72,13 @@
         is( $creq->{parameters}->{ $upload->filename },
             $upload->filename, 'legacy param method ok' );
 
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -127,7 +134,13 @@
         is( $upload->filename, $parameters{filename}, 'Upload filename' );
         is( $upload->size, length( $part->content ), 'Upload Content-Length' );
 
-        ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        SKIP:
+        {
+            if ( $ENV{CATALYST_SERVER} ) {
+                skip 'Not testing for deleted file on remote server', 1;
+            }
+            ok( !-e $upload->tempname, 'Upload temp file was deleted' );
+        }
     }
 }
 
@@ -242,3 +255,67 @@
         is( $upload->filename, 'catalyst_130pix.gif' );
     }
 }
+
+# test uploadtmp config var
+SKIP:
+{
+    if ( $ENV{CATALYST_SERVER} ) {
+        skip 'Not testing uploadtmp on remote server', 13;
+    }
+    
+    my $creq;
+
+    my $dir = "$FindBin::Bin/";
+    local TestApp->config->{ uploadtmp } = $dir;
+    $dir = Path::Class::Dir->new( $dir );
+
+    my $request = POST(
+        'http://localhost/dump/request/',
+        'Content-Type' => 'multipart/form-data',
+        'Content'      => [
+            'testfile' => ["$FindBin::Bin/live_engine_request_uploads.t"],
+        ]
+    );
+
+    ok( my $response = request($request), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->content_type, 'text/plain', 'Response Content-Type' );
+    like(
+        $response->content,
+        qr/^bless\( .* 'Catalyst::Request' \)$/s,
+        'Content is a serialized Catalyst::Request'
+    );
+
+    {
+        no strict 'refs';
+        ok(
+            eval '$creq = ' . $response->content,
+            'Unserialize Catalyst::Request'
+        );
+    }
+
+    isa_ok( $creq, 'Catalyst::Request' );
+    is( $creq->method, 'POST', 'Catalyst::Request method' );
+    is( $creq->content_type, 'multipart/form-data',
+        'Catalyst::Request Content-Type' );
+    is( $creq->content_length, $request->content_length,
+        'Catalyst::Request Content-Length' );
+
+    for my $part ( $request->parts ) {
+
+        my $disposition = $part->header('Content-Disposition');
+        my %parameters  = @{ ( split_header_words($disposition) )[0] };
+
+        next unless exists $parameters{filename};
+
+        my $upload = $creq->{uploads}->{ $parameters{name} };
+
+        isa_ok( $upload, 'Catalyst::Request::Upload' );
+
+        is( $upload->type, $part->content_type, 'Upload Content-Type' );
+        is( $upload->size, length( $part->content ), 'Upload Content-Length' );
+
+        like( $upload->tempname, qr{\Q$dir\E}, 'uploadtmp' );
+    }
+}
+

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uri.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uri.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_request_uri.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -1,12 +1,10 @@
-#!perl
-
 use strict;
 use warnings;
 
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
-use Test::More tests => 49;
+use Test::More tests => 66;
 use Catalyst::Test 'TestApp';
 use Catalyst::Request;
 
@@ -120,3 +118,40 @@
     is( $response->header( 'X-Catalyst-warnings' ), 0, 'no warnings emitted' );
 }
 
+# more tests with undef - should be ignored
+{
+    my $uri = "http://localhost/engine/request/uri/uri_with_undef_only";
+    my ($check) = $uri =~ m{^http://localhost(.+)}; # needed to work with remote servers
+    ok( my $response = request($uri), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    like( $response->header( 'X-Catalyst-uri-with' ), qr/$check$/, 'uri_with ok' );
+
+    # try with existing param
+    $uri = "$uri?x=1";
+    ($check) = $uri =~ m{^http://localhost(.+)}; # needed to work with remote servers
+    $check =~ s/\?/\\\?/g;
+    ok( $response = request($uri), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    like( $response->header( 'X-Catalyst-uri-with' ), qr/$check$/, 'uri_with ok' );
+}
+
+{
+    my $uri = "http://localhost/engine/request/uri/uri_with_undef_ignore";
+    my ($check) = $uri =~ m{^http://localhost(.+)}; # needed to work with remote servers
+    ok( my $response = request($uri), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    like( $response->header( 'X-Catalyst-uri-with' ), qr/$check\?a=1/, 'uri_with ok' );
+
+    # remove an existing param
+    ok( $response = request("${uri}?b=1"), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    like( $response->header( 'X-Catalyst-uri-with' ), qr/$check\?a=1/, 'uri_with ok' );
+
+    # remove an existing param, leave one, and add a new one
+    ok( $response = request("${uri}?b=1&c=1"), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->header( 'X-Catalyst-Param-a' ), '1', 'param "a" ok' );
+    ok( !defined $response->header( 'X-Catalyst-Param-b' ),'param "b" ok' );
+    is( $response->header( 'X-Catalyst-Param-c' ), '1', 'param "c" ok' );
+}
+

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_response_cookies.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_response_cookies.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_engine_response_cookies.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -11,8 +11,8 @@
 use HTTP::Headers::Util 'split_header_words';
 
 my $expected = {
-    Catalyst => [qw|Catalyst Cool path /bah|],
-    Cool     => [qw|Cool Catalyst path /|]
+    catalyst => [qw|catalyst cool path /bah|],
+    cool     => [qw|cool catalyst path /|]
 };
 
 {

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/live_priorities.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/live_priorities.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/live_priorities.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -8,7 +8,6 @@
 
 use Test::More tests => 28;
 use Catalyst::Test 'TestApp';
-use Data::Dumper;
 
 local $^W = 0;
 

Modified: trunk/Catalyst-Engine-HTTP-Prefork/t/optional_prefork-server.t
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/t/optional_prefork-server.t	2008-12-08 21:27:24 UTC (rev 8796)
+++ trunk/Catalyst-Engine-HTTP-Prefork/t/optional_prefork-server.t	2008-12-08 21:28:20 UTC (rev 8797)
@@ -14,6 +14,9 @@
 plan skip_all => 'File::Copy::Recursive required' if $@;
 plan tests => 1;
 
+# Run a single test by providing it as the first arg
+my $single_test = shift;
+
 # clean up
 rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
 
@@ -34,7 +37,7 @@
 # spawn the standalone Prefork server
 my $port = 30000 + int rand(1 + 10000);
 my $pid = open my $server, 
-    "perl -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_prefork.pl -port $port 2>&1 |"
+    "$^X -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_prefork.pl -port $port 2>&1 |"
     or die "Unable to spawn standalone Prefork server: $!";
 
 # wait for it to start
@@ -45,8 +48,14 @@
 
 # run the testsuite against the Prefork server
 $ENV{CATALYST_SERVER} = "http://localhost:$port";
-system( 'prove -r -Ilib/ t/live_*' );
 
+if ( $single_test ) {
+    system( "$^X -Ilib/ $single_test" );
+}
+else {
+    system( 'prove -r -Ilib/ t/live_*' );
+}
+
 # shut it down
 kill 'INT', $pid;
 close $server;




More information about the Catalyst-commits mailing list