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

Aristotle Pagaltzis pagaltzis at gmx.de
Mon May 10 14:19:27 GMT 2010

* Evan Carroll <lists at evancarroll.com> [2010-05-07 19:20]:
> However, I would also expect the below to work; but, it seems
> it doesn't.

I have dozens of such view actions in our $work app. It works.

> I can only formulate the effect I want the above way. This is
> unfortunate because if all chained descendants of `lot` utilize
> a check provided here in the chain, then shouldn't `view_lot`
> also get to utilize that code? It would certainly be nice to
> eliminate redundant code here.

The problem is not in Chained.

> sub lot :Chained('/auth/company') :CaptureArgs(1) {
> sub view_lot :Chained('/auth/company/lot') :PathPart('') :Args(0) {

Your snippet implies that you have a `company` action in an
`Auth` controller (when you chain to `/auth/company`), and
a `lot` action in an `Auth::Company` controller (when you chain
to `/auth/company/lot`). That doesn’t make much sense.

I think you wanted

    sub view_lot :Chained('lot') :PathPart('') :Args(0) {

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Catalyst mailing list