1 package TestApp::Controller::Root;
4 use base 'Catalyst::Controller';
6 __PACKAGE__->config->{namespace} = '';
8 sub chain_root_index : Chained('/') PathPart('') Args(0) { }
10 sub zero : Path('0') {
11 my ( $self, $c ) = @_;
12 $c->res->header( 'X-Test-Class' => ref($self) );
13 $c->response->content_type('text/plain; charset=utf-8');
14 $c->forward('TestApp::View::Dump::Request');
17 sub localregex : LocalRegex('^localregex$') {
18 my ( $self, $c ) = @_;
19 $c->res->header( 'X-Test-Class' => ref($self) );
20 $c->response->content_type('text/plain; charset=utf-8');
21 $c->forward('TestApp::View::Dump::Request');
25 my ( $self, $c ) = @_;
26 $c->res->body('root index');
29 sub global_action : Private {
30 my ( $self, $c ) = @_;
31 $c->forward('TestApp::View::Dump::Request');
34 sub class_forward_test_method :Private {
35 my ( $self, $c ) = @_;
36 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
39 sub loop_test : Local {
40 my ( $self, $c ) = @_;
43 $c->forward( 'class_forward_test_method' );
47 sub recursion_test : Local {
48 my ( $self, $c ) = @_;
49 $c->forward( 'recursion_test' );