gutta wrote on 11/21/09 7:46 AM: > > So you want me to write a MyApp/lib/Controller/Base.pm as follows. > > package MyApp::Controller::Base; > > use strict; > use warnings; > > use parent 'Catalyst::Controller'; > > # > # Sets the actions in this controller to be registered with no prefix > # so they function identically to actions created in MyApp.pm > # > > =head1 NAME > > MyApp::Controller::Base - Base Controller for MyApp > > =head1 DESCRIPTION > > [enter your description here] > > =cut > > 1; > > and will do "use parent 'MyApp::Controller::Base';" instead of my previous > statement "use parent 'MyApp::Controller::Root';" >
I think you want to keep stuff out of MyApp::Controller::* namespace unless you want it instantiated at app startup. Instead, create MyApp::Base::Controller and inherit from that in your MyApp::Controller::* classes. Otherwise, yes, you've got the idea. -- Peter Karman . http://peknet.com/ . [email protected] _______________________________________________ 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/
