has_a inflate issue
[prev]
[thread]
[next]
[Date index for 2004/12/22]
I normally lurk for a while but I've got an issue with a tight deadline. I have some code as follows:
## Time Objectification stuff. See Time::Piece & T:P:MySQL for usage
__PACKAGE__->has_a(
created => 'Time::Piece',
inflate => sub { Time::Piece->from_mysql_timestamp(shift) },
deflate => 'mysql_timestamp',
);
__PACKAGE__->has_a(
last_access => 'Time::Piece',
inflate => sub { Time::Piece->from_mysql_timestamp(shift) },
deflate => 'mysql_timestamp',
);
I'm getting the error:
[Wed Dec 22 13:02:08 2004] [error] Can't inflate created to Time::Piece via CODE(0x8803dac) using '2004-12-22 13:02:08' at /usr/local/share/perl/5.6.1/Class/Trigger.pm line 51
I've tracked this down and the code above is the only place I'm inflating 'created'. I can't figure out why the code is dying on this...
|
has_a inflate issue
diona 18:30 on 22 Dec 2004
|