Re: [CDBI] Class::DBI and mod_perl
john drago <john.drago-n6GNfI+Y5Nu/3pe1ocb+swC/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
Hi Brett, I have found it works quite well, though I'm using: -> Apache 2.0.54 -> mod_perl 2 -> MySQL 5.0 -> Fedora Core 2 -> Perl 5.8.3 -> Class::DBI v3.0.15 One thing I found was to ignore the documentation where it says to override the db_Main method with your own. That caused endless problems. Instead, I simply use this: __PACKAGE__->connection( @DSN ); Works just fine, though I do get a couple broken database connections right after a fresh apache restart. Once those are shaken out, everything's great. Regards, John Drago www.devstack.com On Wed, 22 Nov 2006 09:29 , Brett Randall <[email protected]> sent: 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. _______________________________________________ ClassDBI mailing list ClassDBI-Ra3b/[email protected] http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi _______________________________________________ ClassDBI mailing list ClassDBI-Ra3b/[email protected] http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi