[Catalyst] Bug in Catalyst::Model::DBI .15

Evan Carroll lists at evancarroll.com
Sat May 5 03:01:12 GMT 2007


M::DBI has a pretty sizable bug in as is such that it will establish a
new DBI handle on every incoming connection. This is a problem for
speed, and transactions as it makes it much more difficult to share
$dbh across other models, or to wrap them. I'm very surprised this
went for such a long time undiscovered. This one line caused a lot of
grief.

Thanks goes to >nothingmuch for all his help in first blaming the
problem totally on my style, and then later totally on M::DBI.

root at x60s:/usr/local/share/perl/5.8.8/Catalyst/Model# diff DBI.pm DBI_FIX.pm
59a60,62
>
>       $self->_dbh( $self->connect );
>
72c75
<                       } elsif ( $self->_pid != $$ ) {
---
>       } elsif ( $self->_pid != $$ ) {

--
Evan Carroll
System Lord of the Internets
me at evancarroll.com
832-445-8877

-- 
Evan Carroll
System Lord of the Internets
me at evancarroll.com
832-445-8877



More information about the Catalyst mailing list