[Dbix-class] Storable freeze/thaw on a column?

Matt S Trout dbix-class at trout.me.uk
Wed Nov 29 21:16:35 GMT 2006


Mike Friedman wrote:
> On 11/28/06, *Jess Robinson* <castaway at desert-island.demon.co.uk 
> <mailto:castaway at desert-island.demon.co.uk> > wrote:
> 
>     Basically, because a) half of it already did insist on blessing, and b)
>     I'd like it to pass through things like \'DEFAULT' directly to
>     SQL::A and
>     not attempt to deflate them.

Could we compromise by letting blessed scalars through but handing arrayrefs 
and hashrefs to deflate?

> I guess I can see that for references, but what if somebody wants to 
> "inflate" something into a simple scalar value? For example, I might 
> want to do a simple regex on a datetime column rather than instantiating 
> a whole DateTime object which would be overkill.

That doesn't work now, anyway ...

We've discussed a FilterColumn API that would implement general filtered 1+ 
column <-> 1+ object attr mappings but nobody's ever stepped up with an API 
RFC, let alone a design. Suggestions welcome (though in a new thread please)



More information about the Dbix-class mailing list