[Dbix-class] in- and deflators

Matt S Trout dbix-class at trout.me.uk
Fri Mar 3 13:30:59 CET 2006


On Fri, Mar 03, 2006 at 10:57:04AM +0100, Bernhard Graf wrote:
> Matt S Trout wrote:
> 
> > Since inflate/deflate always produces/accepts an object, an undefined
> > value on set wouldn't be expected to produce anything except undef
> > IMO.
> 
> If this is the way it works, I have to find another way...
> 
> Is there a reason why inflate/deflate transform to/from an object and 
> not unblessed data?

Yes - expecting to get a ref for deflation and not a scalar allows us to
accept a scalar as a deflated value, which is extremely handy on occasion.

the FilterColumn concept is also a valid and useful idiom though, but should
be separate since it can't DWIM in that fashion.

-- 
     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