[CDBI] Class::DBI and mod_perl

Brett Randall brett at ipsware.com
Tue Nov 21 22:29:34 GMT 2006


Hey all

I've just started learning Class::DBI and love it so far, only thing is that I 
primarily use mod_perl (ver 1 still) and so inherently want to try and have 
persistent database connections where possible. I haven't put Class::DBI into 
any of my mp apps yet, I'm just doing some initial research on any problems 
with it before I commit to making changes.

I've looked at the "Using with mod_perl" page on the Class::DBI wiki 
<http://wiki.class-dbi.com/wiki/Using_with_mod_perl> and I notice there are a 
couple of suggestions there to get Apache::DBI and Class::DBI working nicely 
together, one 18 months old and one 2 years old.

My question is: Have any changes been made since this wiki entry that mean 
that I don't have to worry about any kind of additions to my code or 
Apache::DBI? And what is the best way to ensure that Class::DBI uses 
persistent connections? Do I just "use Apache::DBI" in my main CDBI package 
for each of my apps, or do I just use "PerlModule Apache::DBI" in my 
httpd.conf?

Also, I'm looking at moving to mod_perl2 at some point over the next 6 months. 
Anything important I should know about CDBI/Apache::DBI in that version?

Thanks in advance

Brett.



More information about the ClassDBI mailing list