in reply to Site Wide Variables
It may be that what you are looking for is to wrap up $_mem (and perhaps $dbh) in a singleton object derived from Class::Singleton. That way you don't need to worry about where the first use of $_mem or $dbh is made or in what order. Whichever is used first, the singleton code will ensure that they are initialized correctly and in the right order.
|
|---|