[Dbix-class] in- and deflators

Bernhard Graf dbic at augensalat.de
Thu Mar 2 21:53:53 CET 2006


On Thursday 02 March 2006 21:06, Christopher H. Laco wrote:

> You can fix this by:
>
> a) having defaults values that aren't undef
> b) explictly decalre the inflate sub on the inflate_columns relation:
>
> For example...
>
> __PACKAGE__->inflate_column('price', {
>     inflate => sub {Handel::Currency->new(@_)},
>     deflate => sub {shift}
> });
>
> will always inflate, even if the price column contains undef

Does it? At least it will not deflate undef values.
-- 
Bernhard Graf



More information about the Dbix-class mailing list