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.


Cheers,
Toby

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to