[Catalyst] Setting Model Class Variable from Catalyst Config

Derek Wueppelmann dwueppel at gmail.com
Mon Mar 28 16:49:15 GMT 2011


I want to be able to setup a configuration variable in my Catalyst config
that will then be set as the value for one of my model's class variables.
I have a model that will want to use a base path to store some files, However
the Model doesn't know how to access Catalyst and so it can't get the data it
needs. The other issue is that I need it as a class variable so that all of
the instances of a particular class can access the same value once set. I'm
thinking about calling an after method in the root Catalyst app module to set
the variable, but I'm not sure which one I should modify.

Anybody with some suggestions?

-- 
 o)   Derek Wueppelmann           (o
(D .   dwueppel at gmail.com          D).
((`     http://www.monkeynet.ca   ( ) `




More information about the Catalyst mailing list