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

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

From: Michael G Schwern
Subject: Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Date: 19:38 on 26 Jul 2005
On Tue, Jul 26, 2005 at 07:58:04PM +0100, Matt S Trout wrote:
> > What happens when you want to add in another subclass to DBIx::Class?
> > All the extension code that copied your inheritance tree now cannot take
> > advantage and possibly breaks.
>  
> use DBIx::Class::AutoIsa qw/::Core -except -replace ::SQL::Abstract ::SQL::OrderBy -with My::DBIC::SQL::Abstract/;
> 
> Or something along those lines might make things easier.

Gah!  An @ISA copying and patching module?

You're already into scary hacks and things have barely started.


> I think I can still make this work. The problems you mention above are
> very real, but I think I can provide at least partial solutions to most if
> not all of them via tooling and introspection.
> 
> The use of NEXT and MI is, realistically, a hack - but even with the
> additional effort I'll need to make to ensure it doesn't turn into a
> minefield for users and developers alike, I think it's going to be less of
> a hack than any other way I can think of to achieve the flexibility I want.

I'm sure you can make it work with pain, sweat and hacks... but why when
delegation doesn't have any of these problems?

So far its all been focused on why or why not MI.  Let's turn this around.
Why not delegation and a hasa relationship?


        -- 
        Michael G Schwern     schwern@xxxxx.xxx     http://www.pobox.com/~schwern
ROCKS FALL! EVERYONE DIES!
	http://www.somethingpositive.net/sp05032002.shtml

(message missing)

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

Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Michael G Schwern 19:38 on 26 Jul 2005

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