in reply to Re: Problem managing persistent database connections in modules
in thread Problem managing persistent database connections in modules
This would work if I called it within every method (sub) that does database access, but I'm looking for a way to avoid going to that extreme.package MyProject::DbhSingleton; use Apache::Singleton::Request; use base (qw Apache::Singleton::Request); sub _new_instance { my $dbh = DBI->connect($dsn, $user, $pass, $attr) or die DBI->errstr +; }
|
|---|