[Catalyst] Additional scripts accessing the Model and Config?
Thomas Klausner
domm at cpan.org
Fri Jun 8 18:23:17 GMT 2012
Hi!
On Fri, Jun 08, 2012 at 02:05:31PM -0400, Luis Muñoz wrote:
> But still, I would like to have access to the configuration data (for
> instance, how to setup the database/ldap/whatever Model, etc). Does
> that happen as well when using the class method?
We pack our config (which basically is a big hash) in a class. To
provide the config to Catalyst, we use the class in my_app.pl (which is
like my_app.(yml|json|ini|...). If we need the config in some other
scripts, we just use the class there.
The non-Web code lives in classes (eg DBIC) that are used via Models in
Catalyst, or directly (or some Model-like wrappers, if it needs to be)
in other contexts.
Greetings,
domm
--
#!/usr/bin/perl http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
More information about the Catalyst
mailing list