[Catalyst] Init Question and Not Loading a Model Question

Dylan Martin dmartin at sccd.ctc.edu
Thu Apr 2 18:34:39 GMT 2009


I have two questions:  1st, where is a good place to mess with a Cat
instance after its instantiated its components but not during
requests?  2nd, is there a way to make Cat NOT load a model that's in
lib/MyApp/Model?

I want to pass the log object in $c->log to an Authen::Simple object
that I'm using for authentication.  I could have my Login controller
check that that authentication object has the log object, but it seems
silly to do that during every request.  Maybe I should override setup
in MyApp.pm?  No, that wouldn't work because the components aren't
instantiated yet... Hmm...

I have a model class in lib/MyApp/Model.  I'm running my app on two
servers.  I only want to load my model class on one of my servers.  I
can delete the config settings from MyApp.conf, but it still loads,
just without my settings.  Is there a way to make it not load?  Or do
I have to actually rip the .pm file out of lib/MyApp/Model on the server
where I don't want it to load?

Thanks!
-Dylan



More information about the Catalyst mailing list