[Dbix-class] getting a connection in a static method with no args ...
Daniel McBrearty
danielmcbrearty at gmail.com
Sun Aug 13 15:01:22 CEST 2006
i'm actually using "MySchema->connection($dsn)"
then MySchema->resultset( ... )
but i seem to remember someone telling someone they oughtn't ....
On 8/13/06, Daniel McBrearty <danielmcbrearty at gmail.com> wrote:
> ... without having a new connection each time?
>
> basically, I have a static method that takes no args, it needs to
> access the schema *once* (first time only). I don't want it
> instantiate a new connection and hold it for the lifetime of the
> process for this ... especially as there will probably be others the
> same elsewhere.
>
> should I make a singleton method in my schema?
>
>
> --
> Daniel McBrearty
> email : danielmcbrearty at gmail.com
> www.engoi.com : the multi - language vocab trainer
> BTW : 0873928131
>
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
More information about the Dbix-class
mailing list