[jifty-devel] Re: [Jifty-commit] r1237 - in Jifty-DBI/trunk: . lib/Jifty lib/Jifty/DBI

Sean E. Millichamp sean at enertronllc.com
Fri Jun 9 19:16:52 EDT 2006

On Fri, 2006-06-09 at 18:58 -0400, Jesse Vincent wrote:

> It looks like this is a bit of a backwards incompatible change, but that
> it would be pretty easy to fix. Breaking APIs is ungood, especially when
> there's code out there that depends on the old API.  If there _is_ a
> reason to break the API, it should get flagged good and loud.

Yeah, I know.  I probably should have asked on the list before
committing it, but after staring at it for a while I couldn't find
another solution.  Perhaps someone with more Perl-fu then I will see an
easier/better solution.  I was planning on writing an email to the list
but was wondering if you would beat me to it.

The problem I found was that I needed to create another instance of
whatever object I had in is_distinct with $self->new().  I don't know if
anything else ever would need to do that or not in Jifty::DBI, but it
seemed like something that shouldn't be hard or impossible.

Jifty::DBI::Record's _init() required that all new()s were passed a
single argument, the handle.  However, when I called $self->new() and
$self was a Jifty::Record it expected a hash because of Jifty::Record's

Since _init() is obviously supposed to be overridden I would think that
however it is done that a call to $self->new(BLAH) in Jifty::DBI will
work with a Jifty::DBI::Record or anything else that inherits from it.

Thoughts?  I'll admit that I could be looking at this the wrong way...
If you have a different direction you want me to go in I'll rework it.


 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20060609/6d04180c/attachment.pgp

More information about the jifty-devel mailing list