X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=18c6db802fe7bae9a59b93132bce6f3ddf66efd2;hb=9c74923de2304b8c8f0a7a2faa0854ad9b4d3a92;hp=fc88317f26e6d9979f28ad7ada9800c67a03332d;hpb=53119b7876049abfe0d4e4bea5e85724dd4778d7;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index fc88317..18c6db8 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} = ''; @@ -13,4 +14,59 @@ sub zero : Path('0') { $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'); +} + +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 recursion_test : Local { + my ( $self, $c ) = @_; + $c->forward( 'recursion_test' ); +} + +sub base_href_test : Local { + my ( $self, $c ) = @_; + + my $body = <<"EndOfBody"; + + + + + + + +EndOfBody + + $c->response->body($body); +} + +sub end : Private { + my ($self,$c) = @_; +} + 1;