Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Catalyst - components from other namespace

by stonecolddevin (Vicar)
on Mar 17, 2011 at 17:43 UTC ( #893818=note: print w/replies, xml ) Need Help??

in reply to Catalyst - components from other namespace

CatalystX::InjectComponent allows you to inject arbitrary classes into your app, but I have to ask what you're trying to achieve by this? If you want to use a, say, Moose class, as a model for instance, you can use Catalyst::Model::Adaptor.


  • Comment on Re: Catalyst - components from other namespace

Replies are listed 'Best First'.
Re^2: Catalyst - components from other namespace
by roman (Monk) on Mar 17, 2011 at 19:28 UTC

    It seems that CatalystX::InjectComponent does what I need.

    I have two applications sharing quite a lot of codebase (they are actually two interfaces to one backend). They have many common actions, they use same DBIx::Class::Model, they both render their output via Mason with same configuration.

    Of course I could create OurApp::Controller::* and inherited it by MyApp::Controller::* and YourApp::Controller::*, but it just triples the number of files.

      In that case I'd work on putting together an API layer over the backend and having the web apps just be layers on top of THAT that use those API calls as opposed to injecting this with that and such. It will give you a tremendously more flexible application structure.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://893818]
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-01-17 06:02 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (196 votes). Check out past polls.