File: ChainedExample.pm

package info (click to toggle)
libcatalystx-simplelogin-perl 0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: perl: 3,134; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package TestApp::Controller::ChainedExample;
use Moose;
use namespace::autoclean;

BEGIN { extends 'Catalyst::Controller' }

sub base : Chained('/login/required') PathPart('chainedexample') CaptureArgs(0) {} # Chain everything in the controller off of here.

sub index : Chained('base') PathPart('') Args(0) { # /chainedexample
}

sub item : Chained('base') PathPart('') Args(1) { #/chainedexample/$arg1
    my ($self, $c, $arg1) = @_;
    $c->stash->{arg1} = $arg1;
}

sub no_auth_base : Chained('/login/not_required') PathPart('chainedexample') CaptureArgs(0) {} 

sub public : Chained('no_auth_base') Args(0) {} # /chainedexample/public

__PACKAGE__->meta->make_immutable;