X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FRegexp.pm;h=4b59d58641f5b21ad3b814291fdb95215a35e28b;hb=2c527b9130ee042eaa8e5996f565c75764d18117;hp=e454cfd57cdfe0eb3f2502eee09fdb326531fe10;hpb=66741f94ac93b7ba0989db3556d0e3fe36c1be87;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Action/Regexp.pm b/t/lib/TestApp/Controller/Action/Regexp.pm index e454cfd..4b59d58 100644 --- a/t/lib/TestApp/Controller/Action/Regexp.pm +++ b/t/lib/TestApp/Controller/Action/Regexp.pm @@ -13,4 +13,18 @@ sub two : Action LocalRegexp('^(\d+)/(\w+)$') { $c->forward('TestApp::View::Dump::Request'); } +sub three : Action LocalRegex('^(mandatory)(/optional)?$'){ + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Request'); +} + +sub four : Action Regex('^action/regexp/redirect/(\w+)/universe/(\d+)/everything$') { + my ( $self, $c ) = @_; + $c->res->redirect( + $c->uri_for($c->action, $c->req->captures, + @{$c->req->arguments}, $c->req->params + ) + ); +} + 1;