I have the following code in several of my mod_perl handlers:
my $dbh = DBI->connect($c{db}{dsn}, $c{db}{user}, $c{db}{pass})
|| die(DBI::errstr);
Is there a way to do something like:
my $dbh = $MyModules::DBH;
instead of putting connect string in *EVERY* script?
to get the database handle? Someone mentioned doing a ChildInitHandler and using
Class::Singleton.. I'm a clueless newbie so I
didn't get too far with this (code snippets anyone?).
TIA
Ian
