M
M2
Hi,
I'm looking for a way to store some common objects (e.g. a database handle)
in such a way that it may be accessed from anywhere within an OO based
mod_perl application.
My first attempt used the UNIVERSAL package to stash it but that felt
clunky, not to mention risky. For my second attempt I made all objects
inherit from a single object which returned them from a global. Of course
this has the potential for some dire issues under mod_perl even though
they're reset on each execution.
Outside of this I cannot seem to find a way to get the data accessible
without passing it around all over the place which I would dearly like to
avoid.
Am I missing something?
Matt.
I'm looking for a way to store some common objects (e.g. a database handle)
in such a way that it may be accessed from anywhere within an OO based
mod_perl application.
My first attempt used the UNIVERSAL package to stash it but that felt
clunky, not to mention risky. For my second attempt I made all objects
inherit from a single object which returned them from a global. Of course
this has the potential for some dire issues under mod_perl even though
they're reset on each execution.
Outside of this I cannot seem to find a way to get the data accessible
without passing it around all over the place which I would dearly like to
avoid.
Am I missing something?
Matt.