Re: has_a inflate issue
[prev]
[thread]
[next]
[Date index for 2004/12/23]
I'll try that to see if it works...
thanks for the suggestion. seems easier to read and more direct.
diona kidd
On Dec 22, 2004, at 8:11 PM, Tony Bowden wrote:
> On Wed, Dec 22, 2004 at 06:30:40PM +0000, diona@xxxxxxxxx.xxx wrote:
>> __PACKAGE__->has_a(
>> created => 'Time::Piece',
>> inflate => sub { Time::Piece->from_mysql_timestamp(shift) },
>> deflate => 'mysql_timestamp',
>> );
>
> Why can't you just do:
> __PACKAGE__->has_a(
> created => 'Time::Piece',
> inflate => 'from_mysql_timestamp',
> deflate => 'mysql_timestamp',
> );
>
> ??
>
> Tony