Refreshing branch
[catagits/Catalyst-Runtime.git] / trunk / t / lib / TestApp / Controller / Action / Chained / Foo.pm
CommitLineData
ceae39c5 1package TestApp::Controller::Action::Chained::Foo;
2
3use strict;
4use warnings;
5
6use base qw/Catalyst::Controller/;
7
8#
9# Child of current namespace
10#
11sub spoon :Chained('.') :Args(0) { }
12
13#
14# Root for a action in a "parent" controller
15#
16sub higher_root :PathPart('chained/higher_root') :Chained('/') :CaptureArgs(1) { }
17
18#
19# Parent controller -> this subcontroller -> parent controller test
20#
21sub pcp2 :Chained('/action/chained/pcp1') :CaptureArgs(1) { }
22
23#
24# Controllers not in parent/child relation. This tests the end.
25#
26sub cross2 :PathPart('end') :Chained('/action/chained/bar/cross1') :Args(1) { }
27
28#
29# Create a uri to the root index
30#
31sub to_root : Chained('/') PathPart('action/chained/to_root') {
32 my ( $self, $c ) = @_;
33 my $uri = $c->uri_for_action('/chain_root_index');
34 $c->res->body( "URI:$uri" );
35 $c->stash->{no_end}++;
36}
37
381;