You didn't understand what i meant. MyApp::A is not a class. It's a whole application with all surrounding stuff. so and MyApp::B.
Ok lets build the question in another manner: Catalyst scans for all modules under MyApp::Controller to build the list of url actions. How to make Catalyst scan another OtherApp::Controller and add all found url actions to MyApp ? 2007/5/2, Christopher H. Laco <[EMAIL PROTECTED]>:
Peter Karman wrote: > > > Oleg Pronin scribbled on 5/2/07 5:30 AM: >> Greetings! >> >> I want to make MyApp::B a part of MyApp::A under namespace for example >> /folder/ >> >> Both B and A are normal catalyst applications. (both do >> '__PACKAGE__->setup()' and etc. and therefore cannot work together). >> >> How to do this with minimal changes to application A (for example, >> using B >> as plugin) and any complex changes to application B ? >> >> I do not want to do this using apache features (setting MyApp::B's >> handler >> to location /folder/). >> I want this: if MyApp::A loads MyApp::B as plugin then all of >> functionalities of B goes under A/folder/. >> > > this sounds like a straightforward subclassing arrangement -- unless I'm > missing something crucial? > > MyBaseClass.pm: > > package MyBaseClass; > > # all the stuff currently in MyApp::B here > > 1; > > MyApp/A.pm: > > package MyApp::A; > use base qw( MyBaseClass ); > 1; > > MyApp/B.pm: > > package MyApp::B; > use base qw( MyBaseClass ); > 1; > > > then override and extend MyApp::A and MyApp::B for whatever > application-specific reasons you have. > This sounds good on paper, but in practice it doesn't work. (assuming ::A and ::B containg the Cat stuff like ->setup, Catalyst qw/Plugins..,/, etc. You can only call setup once which means you have to put the A stuff in A, and the B stuff in B, mostly killing the point of subclassing... Of course, I could be missing the point... _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
