Fix not stripping backslashes in DispatchType::Regex::uri_for_action
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Regexp.pm
CommitLineData
dd4e6fd2 1package TestApp::Controller::Action::Regexp;
2
3use strict;
4use base 'TestApp::Controller::Action';
5
6d030e6f 6sub one : Action Regex('^action/regexp/(\w+)/(\d+)$') {
dd4e6fd2 7 my ( $self, $c ) = @_;
8 $c->forward('TestApp::View::Dump::Request');
9}
10
081def36 11sub two : Action LocalRegexp('^(\d+)/(\w+)$') {
dd4e6fd2 12 my ( $self, $c ) = @_;
13 $c->forward('TestApp::View::Dump::Request');
14}
15
cccc8f68 16sub three : Action LocalRegex('^(mandatory)(/optional)?$'){
17 my ( $self, $c ) = @_;
18 $c->forward('TestApp::View::Dump::Request');
19}
20
873b98ee 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
b1cb1951 30sub one_backslashes : Action Regex('^action/regexp/(\w+)/(\d+)\.html$') {
31 my ( $self, $c ) = @_;
32 $c->forward('TestApp::View::Dump::Request');
33}
34
dd4e6fd2 351;