[Catalyst] Sub-classing Application

Tomas Doran bobtfish at bobtfish.net
Wed Dec 16 20:35:12 GMT 2009


On 16 Dec 2009, at 18:22, Bill Moseley wrote:
> Means I need to make mostly duplicate and empty controllers for both  
> Foo and Bar applications but seems like a reasonable price to pay.

An (or, in fact, two!) alternate solutions:

1) Keep the controllers as they are in your first app, then do  
something after setup_components to load all the controllers in the  
other app, resolve which components are missing in your app after  
startup, then use CatalystX::InjectComponent to add them.

2) Teach CatalystX::InjectComponent about moose roles, and go with  
pulling the functionality apart into roles anyway for easier reuse  
when you want to override things. Rest of solution as above :)

Cheers
t0m




More information about the Catalyst mailing list