[Catalyst] Problem with the order of action

Toby Corkindale toby.corkindale at strategicdata.com.au
Wed Dec 10 00:01:12 GMT 2008

José Castro wrote:
> Hi.
> Let's say I have (and I do) something like this in one controller:
>     sub create : Path('/users/new') {
> and something like this in another controller:
>     sub attribute : Regex('^([^/]+)/([^/]+)(?:/page/(\d+))?$') {
> My goal here is to try to match the url with /users/new and, that 
> failing, try matching with that regex up there.
> My problem, as many of you will have figured out, if that /users/new is 
> bumping into the attribute sub (which makes sense, as it does match the 
> regex).
> Is there any way of tampering with the order the methods in the 
> controllers are tried? (other than changing the names of the 
> controllers, hopefully)

I think here you should look at what you're trying to do, and map it 
onto Catalyst a little differently. That Regex is worrying me.

Have you read the documentation on the "Chained" method of dispatching?

I think it could be the right way to do that.


More information about the Catalyst mailing list