X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=5b292019d68a02ea2cb1322691d12c4c54680929;hp=a3978d68c95849291ed40025d211f2dbc9d3b45b;hb=5ab21903f27011f38ec3e32ef2e649065e7adc1e;hpb=2eb2c42f2faef472cecd3788573d4872943334b6 diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index a3978d6..5b29201 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -1,5 +1,6 @@ package TestApp::Controller::Root; - +use strict; +use warnings; use base 'Catalyst::Controller'; __PACKAGE__->config->{namespace} = ''; @@ -20,8 +21,36 @@ sub localregex : LocalRegex('^localregex$') { $c->forward('TestApp::View::Dump::Request'); } -sub chain_to_self : Chained('chain_to_self') PathPart('') CaptureArgs(1) { } +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 class_forward_test_method :Private { + my ( $self, $c ) = @_; + $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 ); +} + +sub loop_test : Local { + my ( $self, $c ) = @_; + + for( 1..1001 ) { + $c->forward( 'class_forward_test_method' ); + } +} -sub chain_recurse_endoint : Chained('chain_to_self') Args(0) { } +sub recursion_test : Local { + my ( $self, $c ) = @_; + $c->forward( 'recursion_test' ); +} + +sub end : Private { + my ($self,$c) = @_; +} 1;