In case it is of interest I have solved the problem like this.
package GSystem::Common::DBH;
use strict;
use warnings;
use Log::Log4perl qw(get_logger);
use DBI;
our $dbh = undef;
sub dbh {
my $log = get_logger('GSystem::Common::DBH');
my $dbusr = user;
my $dbpwd = pwd;
my $dsn = GSystem;
On Feb 19, 2008 5:02 AM, Mark Knoop [EMAIL PROTECTED] wrote:
I would be interested to know of any flaws in my logic...
This is okay for CGI. It would not be good for any persistent
environment like FastCGI, PerlEx, or mod_perl. It those environments
it will break if your database
I would be interested to know of any flaws in my logic...
I did something like that, but went further. I started out with the
goal not to connect to the DB until necessary, and ended up with a
goal not to even test if I've already connected to the DB, or if the
handle is still alive, etc. I
On Feb 19, 2008 5:02 AM, Mark Knoop [EMAIL PROTECTED] wrote:
I would be interested to know of any flaws in my logic...
This is okay for CGI. It would not be good for any persistent
environment like FastCGI, PerlEx, or mod_perl. It those environments
it will break if your database connection
Just my 2cents... Apache::DBI. Entirely forget about passing it around..
that's too much work. Create an ini file or something, and put your
connection options in there, maybe even your own lib to connect to various
db's, but call the connect from various libs whenever needed, and let
Apache::DBI
On Thu, Feb 14, 2008 at 6:27 AM, Joshua Miller [EMAIL PROTECTED] wrote:
Just my 2cents... Apache::DBI. Entirely forget about passing it around..
that's too much work. Create an ini file or something, and put your
connection options in there, maybe even your own lib to connect to various
On Thu, Feb 14, 2008 at 6:27 AM, Joshua Miller [EMAIL PROTECTED] wrote:
Just my 2cents... Apache::DBI. Entirely forget about passing it around..
that's too much work. Create an ini file or something, and put your
connection options in there, maybe even your own lib to connect to
various
On 02/14/2008 06:03 AM, Mark Knoop wrote:
Ah am using IIS as we are on Windoze and I am not as familiar with
administering Apache (and we can't afford a sysadmin just yet). I am
planning to migrate and go down the mod_perl route but that is down the
list after CGI::Appifying my code and