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

Ruslan Zakirov ruslan.zakirov at gmail.com
Fri Jun 9 19:55:57 EDT 2006


On 6/10/06, Jesse Vincent <jesse at bestpractical.com> wrote:
> So, I think the change makes sense. It's just the "not breaking old
> code" that worries me. For that, you can look at @_. If it's only got
> one thing in it, that's the old API...
and warn loudly that API is deprecated :), anyway any _init method
should expect hash.


>
>
> On Fri, Jun 09, 2006 at 07:16:52PM -0400, Sean E. Millichamp wrote:
> > 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
> > _init().
> >
> > 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
> >
> > --
> >  Sean E. Millichamp, Enertron LLC, 586-757-1200 x102
> >
>
>
>
> > _______________________________________________
> > jifty-devel mailing list
> > jifty-devel at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
>
> --
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>


-- 
Best regards, Ruslan.


More information about the jifty-devel mailing list