Am 21.11.2009 um 16:34 schrieb gutta:

> 
> Hi,
> 
> I tried to use "use parent 'MyApp::Controller::Root';"
> 
> instead of use parent 'Catalyst::Controller'; in all my other
> controllers(for ex: User.pm).
> 
> The reason is that Root.pm is already inheriting Catalyst::Controller.
> 
> But when i do this catalyst dispatcher is considerting all controller
> actions in my other controllers under namespace ''.
> 
> But if i declare __PACKAGE__->config->{namespace} = 'user'; its working as
> expected.

You can try to set it to undef, so that the controller namespace magic can 
happen.
But not sure if this is working. Worth a try, though.

A better solution would be to create a base class MyApp::Controller::Base which 
does not set the namespace so that you only need to set it in the root 
controller.

moritz
_______________________________________________
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