Re: [Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-08 Thread Alexander Hartmaier
Trevors example might overwhelm you a bit if you're not already that familiar with chained. The thing to understand is, every endpoint needs to end with an action that uses Args, every part in the chain CaptureArgs, both might be (0). So in your example you need a middle chain part for lot with

[Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-07 Thread Evan Carroll
I have two destinations in my Catalyst app /auth/company/5/lot /auth/company/5/lot/5 This works and is often seen in Catalyst apps to achive this effect. sub lot :Chained('/auth/company') :CaptureArgs(1) { sub view_lot :Chained('/auth/company') :PathPart('') :Args(1) { However, I would also

Re: [Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-07 Thread J. Shirley
On May 7, 2010, at 10:12 AM, Evan Carroll wrote: I have two destinations in my Catalyst app /auth/company/5/lot /auth/company/5/lot/5 This works and is often seen in Catalyst apps to achive this effect. sub lot :Chained('/auth/company') :CaptureArgs(1) { sub view_lot

Re: [Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-07 Thread Trevor Leffler
Evan, Here's an example of chaining that breaks out a lot of your path parts into discreet methods. Watch the server debug output while hitting these in your browser to see how each piece is executed. Notice how middle man methods use :CaptureArgs while endpoints use :Args. Also, each

Re: [Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-07 Thread Ram Dobson
it seems to me that you have companies that have lots. something like this: sub company :Chained('/auth') :CaptureArgs(1) { ... } sub lot :Chained('company') :Args(0) { ... } sub view_lot :Chained('lot') PathPart('') :Args(1) { ... } would suffice, perhaps? On 5/7/2010 1:12 PM, Evan Carroll

Re: [Catalyst] Chained actions with can't terminate with :PathPart('') ?

2010-05-07 Thread Trevor Leffler
Oh, and to be clear about the example controllers, they'd be named: ::Root, ::Company, and ::Company::Lot. --Trevor Trevor Leffler wrote: Evan, Here's an example of chaining that breaks out a lot of your path parts into discreet methods. Watch the server debug output while hitting these