File: Foo.pm

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (38 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package TestApp::Controller::Action::Chained::Foo;

use strict;
use warnings;

use base qw/Catalyst::Controller/;

#
#   Child of current namespace
#
sub spoon :Chained('.') :Args(0) { }

#
#   Root for a action in a "parent" controller
#
sub higher_root :PathPart('chained/higher_root') :Chained('/') :CaptureArgs(1) { }

#
#   Parent controller -> this subcontroller -> parent controller test
#
sub pcp2 :Chained('/action/chained/pcp1') :CaptureArgs(1) { }

#
#   Controllers not in parent/child relation. This tests the end.
#
sub cross2 :PathPart('end') :Chained('/action/chained/bar/cross1') :Args(1) { }

#
#   Create a uri to the root index
#
sub to_root : Chained('/') PathPart('action/chained/to_root') {
    my ( $self, $c ) = @_;
    my $uri = $c->uri_for_action('/chain_root_index');
    $c->res->body( "URI:$uri" );
    $c->stash->{no_end}++;
}

1;