Rodrigo ha scritto:


On Fri, Jan 16, 2009 at 6:13 PM, Marcello Romani <[email protected] <mailto:[email protected]>> wrote:

    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 in 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


------------------------------------------------------------------------

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

It works fine for me too, today :-)

I always use the dev server with -r, so it could be that the thing was not picked up until I CTRL-C'ed the server and restarted manually...

Sorry for the noise.

--
Marcello Romani


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

Reply via email to