Hi, I'm trying to find a way in which I can stash some commonly used data (e.g. a database handle) in a location that I can access from anywhere within a large OO mod_perl application.
After learning the ills of using globals under mod_perl the hard way I am now toying with the use of class wide variables in an object inherited by all within the application. My tests so far have been positive but I just wanted to check against the mod_perl brains out there if this is safe. The code is as follows: Client Object snippet use vars qw(test::master); Master Object (inherited everywhere object) == snip == package test::master; { my $dbh = etc etc; } In this scenario it looks like the single $dbh is returned from any call to it from a "client" object ok and can't find any evidence of crossover between httpd children (sorry if that's the wrong term). So, is this crazy thinking or am I on the right track? Thanks, Matt.