Class::DBI and Time::Piece::MySQL woes
[prev]
[thread]
[next]
[Date index for 2004/06/11]
Hi,
After upgrading to Class::DBI 0.96,
the following does not work anymore:
__PACKAGE__->has_a(angelegt => 'Time::Piece::MySQL',
inflate => sub { Time::Piece->from_mysql_datetime( shift ); },
deflate => 'mysql_datetime',
);
The error I get is:
Inflate method didn't inflate right at
/usr/lib/perl5/site_perl/5.8.0/Class/DBI/Relationship/HasA.pm line 59
Looking at HasA.pm, I suspect the problem is, that I tell CDBI, that
'angelegt' is a Time::Piece::MySQL object, but the object isn't really
Time::Piece::MySQL, rather, it's just Time::Piece.
I really would like to avoid having to copy the Time::Piece::MySQL code
into my CDBI class, so is there an easy way I can keep on using T::P::M?
Regards,
Alexander Gräfe
|
Class::DBI and Time::Piece::MySQL woes
Alexander =?iso-8859-1?Q?Gr=E4fe?= 13:14 on 11 Jun 2004
|