Uragan has asked for the wisdom of the Perl Monks concerning the following question:
Hi all! I use Catalyst and DBI. I want to connect my database only in one place. But now every model has it's own connection and I must write in config file params(dsn, username, password) for every model, like this:
<Model::Name_of_model> dsn DBI:mysql:name_of_database user username password user_password </Model::Name_of_Model>
I must do it for every model. Is it possible to do it only once and in one place? And that each model would take these params.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Catalyst and DBI
by Anonymous Monk on Jul 04, 2011 at 06:56 UTC | |
Re: Catalyst and DBI
by trwww (Priest) on Jul 04, 2011 at 18:58 UTC | |
by Uragan (Initiate) on Jul 04, 2011 at 20:41 UTC | |
by Solo (Deacon) on Aug 25, 2011 at 09:28 UTC | |
by brainbuz (Novice) on Sep 08, 2011 at 15:16 UTC | |
Re: Catalyst and DBI
by sundialsvc4 (Abbot) on Jul 04, 2011 at 12:50 UTC |
Back to
Seekers of Perl Wisdom