pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks!
What's the best way/place to do some global init code in Catalyst? IE, I want to set some default values at startup, not in my controller.
I have some Authen::Simple classes that I'm using. I'm loading them from the config file, so I never touch them in code except to say authenticate($username,$password) in my controllers. I want to pass the $c->log object to Authen::Simple::X object to use for logging. Near as I can tell, the time/place to do that would be in some handy init subroutine, but I don't see an obvious one in the docs.
Thanks!
--Pileofrogs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catalyst Init?
by holli (Abbot) on Apr 02, 2009 at 17:46 UTC | |
|
Re: Catalyst Init?
by Your Mother (Archbishop) on Apr 02, 2009 at 17:41 UTC |