Updating branch to current revision
[catagits/Catalyst-Runtime.git] / trunk / t / lib / TestApp / Controller / Action / Regexp.pm
CommitLineData
e28a6876 1package TestApp::Controller::Action::Regexp;
2
3use strict;
4use base 'TestApp::Controller::Action';
5
6sub one : Action Regex('^action/regexp/(\w+)/(\d+)$') {
7 my ( $self, $c ) = @_;
8 $c->forward('TestApp::View::Dump::Request');
9}
10
11sub two : Action LocalRegexp('^(\d+)/(\w+)$') {
12 my ( $self, $c ) = @_;
13 $c->forward('TestApp::View::Dump::Request');
14}
15
16sub three : Action LocalRegex('^(mandatory)(/optional)?$'){
17 my ( $self, $c ) = @_;
18 $c->forward('TestApp::View::Dump::Request');
19}
20
21sub four : Action Regex('^action/regexp/redirect/(\w+)/universe/(\d+)/everything$') {
22 my ( $self, $c ) = @_;
23 $c->res->redirect(
24 $c->uri_for($c->action, $c->req->captures,
25 @{$c->req->arguments}, $c->req->params
26 )
27 );
28}
29
301;