Danny Warren wrote:
> # Responds to /object/list
> sub list : Local { ... }
>
> # Captures object id, as in /object/[OBJ_ID]
> sub object : PathPart('object') Chained CaptureArgs(1) { ... }
>
> # Responds to /object/[OBJ_ID]/edit
> sub edit : Chained('object') Args(0) { ... }
>
> # Chain point for chaining to property controller
> # NOTE: This is just a jump point, don't put bizlogic in here,
> # put it in the property controller
> sub property : Chained('object') CaptureArgs(0) { ... }
I usually handle this with a common base chain element:
sub base: Chained PathPart('object') CaptureArgs(0) { }
sub list: Chained('base') Args(0) { } # /list
sub load: Chained('base') CaptureArgs(1) { }
sub edit: Chained('load') Args(0) # /object/23/edit
...
.phaylon
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/