Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"

[prev] [thread] [next] [Date index for 2005/07/26]

From: Sam Vilain
Subject: Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Date: 04:21 on 26 Jul 2005
Perrin Harkins wrote:
>> The inheritence of Ima::DBI is another example.  People have had
>> difficulty with multiple handles and mod_perl, yet since it's
>> statically inherited behaviour there is nowhere to cleanly override it.
>> And that's not even a multiple inherience issue.
> And my solution to this in Ima::DBI is pretty much what Schwern 
> described: delegate the management of database connections to a separate 
> class, with a default implementation and an easy way to specify your own 
> alternative class that implements the same interface.  The code changes 
> are pretty minimal so far.  As soon as I finish updating the docs I'll 
> put out a dev release.

This, to me, represents a part of the seductive over-simplicity of
Class::DBI; hiding the database handle details in a package global is
pretty nasty, for this and other reasons.  Much better to pass it around
as a lexical.

Sam.

(message missing)

Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Sam Vilain 04:21 on 26 Jul 2005

Delegation vs Hooks (was: Annouce: DBIx::Class, a.k.a "taking the easy way out")
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 23:27 on 26 Jul 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52