[DBIx-Class-Devel] Re: Comments on the dq branch test suite changes

Matt S Trout mst at shadowcat.co.uk
Mon Dec 17 18:45:43 GMT 2012


On Sat, Dec 08, 2012 at 07:51:05PM +1100, Peter Rabbitson wrote:
> > > * The current code has forever been inferring the 'AS' part from the 
> > > dbic-side 'as' specification. You made a number of test changes where a 
> > > columns => { foo => 'bar.baz' } no longer works, but must be replaced 
> > > with columns => { foo => { '' => 'bar.baz', -as => 'foo' } }. This is an 
> > > incompatible change and will cause a lot of subtle breakage in 
> > > non-trivial queries. Is there a way to get things back to have things 
> > > work as before?
> > 
> > When I last asked you about this, you said you'd just been lazy in the
> > tests and to go ahead and change it.
> > 
> > What's changed since?
> 
> >.< What we had there is a failure to communicate I suppose. The decision
> to reuse the dbic-side "as" in hindsight was lazy, but it has been there
> for good 3 years now. I would not have said "meh, throw, people will fix
> their code". If this is the way you want to go forward - again we need to
> deprecate ASAP... but really this is a *lot* of code. I rather help you
> implement (as in bug you to implement ;) the 'as' passage.

Well, if there's -separate- tests for it, I think it could quite reasonably
be done during the processing of resultset attributes. It just doesn't really
belong inside the SQL generator, since the dbic-side 'as' is long gone by
then and I don't want to poke it back in.

-- 
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.



More information about the DBIx-Class-Devel mailing list