1 package TestApp::Controller::Root;
3 use base 'Catalyst::Controller';
5 __PACKAGE__->config->{namespace} = '';
7 sub chain_root_index : Chained('/') PathPart('') Args(0) { }
10 my ( $self, $c ) = @_;
11 $c->res->header( 'X-Test-Class' => ref($self) );
12 $c->response->content_type('text/plain; charset=utf-8');
13 $c->forward('TestApp::View::Dump::Request');
16 sub localregex : LocalRegex('^localregex$') {
17 my ( $self, $c ) = @_;
18 $c->res->header( 'X-Test-Class' => ref($self) );
19 $c->response->content_type('text/plain; charset=utf-8');
20 $c->forward('TestApp::View::Dump::Request');
24 my ( $self, $c ) = @_;
25 $c->res->body('root index');
28 sub global_action : Private {
29 my ( $self, $c ) = @_;
30 $c->forward('TestApp::View::Dump::Request');
33 sub class_forward_test_method :Private {
34 my ( $self, $c ) = @_;
35 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
38 sub loop_test : Local {
39 my ( $self, $c ) = @_;
42 $c->forward( 'class_forward_test_method' );
46 sub recursion_test : Local {
47 my ( $self, $c ) = @_;
48 $c->forward( 'recursion_test' );