[Catalyst] Re: Database connections leaking

Aristotle Pagaltzis pagaltzis at gmx.de
Sun Dec 30 20:54:18 GMT 2007


[F'up-to dbix-class]

* Matt S Trout <dbix-class at trout.me.uk> [2007-12-24 19:30]:
> You might want to see about ripping out the C::M::DBI
> connection management and using a DBIx::Class::Storage::DBI
> object instead - the Model::DBI code originates from a copy of
> the DBIx::Class code but I'm unaware of whether bugfixes and
> refactorings have been propagated to it.

Might it be worthwhile to rip the code out of both and put it in
a separate DBIx::EnsureConnected or something like that, and then
make sure that such objects can be used in place of plain DBI
handles, so that anyone who needs this functionality can use that
instead of maintaining the $N'th copy of the code?

I’ve been putting code in number places to let them accept a
coderef in place of a DBH in a number of places so that they can
ask something like DBIC::S::DBI or C::M::DBI for a handle on
demand instead of keeping their own copy of it, but that’s now
striking me as the wrong strategy.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list