[Dbix-class] RFC: list/array context, TT and search()

Matt S Trout dbix-class at trout.me.uk
Thu Mar 23 02:28:17 CET 2006


Dave Howorth wrote:
> Will Hawes wrote:
>> I'd vote for removing wantarray() completely. IMO, if a user wants 
>> objects rather than a ResultSet, they should call ->all.
> 
> How about providing *_all methods to avoid doubling the number of method 
> invocations and avoid constructing/destroying unwanted iterators?

It's not an iterator, it's a full ResultSet. This is fundamental to the DBIC 
design - and also means in many cases you can't get where you need to without 
creating a new one since it encapsulates the query etc.

Mostly, I'd really like to just get rid of the array-in-list-context behaviour 
but don't want to spanner anybody relying on it in production. Anybody got any 
bright ideas?

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list