[Catalyst] controller subclass and :Local actions

Rodrigo rodrigolive at gmail.com
Sat Jan 17 20:01:59 GMT 2009


On Fri, Jan 16, 2009 at 6:13 PM, Marcello Romani <mromani at ottotecnica.com>w=
rote:

> Hallo,
>    I have a controller base class that implements the usual crud actions
> (list, create, etc.), and I would like to override i.e. the list method i=
n a
> subclass, but the subclass' list method doesn't seem to get called...
>
> In MyApp::Controller::Base:
>
> use base qw( Catalyst::Controller );
>
> sub list : Local {
>    do stuff
> }
>
> In MyApp::Controller::CD:
>
> use base qw( MyApp::Controller::Base );
>
> sub list : Local {
>    do other stuff
> }
>
>
> when I call /myapp/cd/list the base controller's list action gets called.=
..
>
> Can someone give me a hint ?
>
> Thank you.
>
> --
> Marcello Romani
>

Strange. That works fine for me. What does the debug output prints out for
the path dispatch table when the server starts up?

It should look something like this:

[debug] Loaded Path actions:
.---------------------+--------------------.
| Path                | Private            |
+---------------------+--------------------+
| /base/list          | /base/list         |
| /cd/list            | /cd/list           |
'---------------------+--------------------'

-rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090117/f2bb6=
78e/attachment.htm


More information about the Catalyst mailing list