Re: [CDBI] Multiple inflate CODE references

[prev] [thread] [next] [Date index for 2005/10/07]

From: William Ross
Subject: Re: [CDBI] Multiple inflate CODE references
Date: 10:11 on 07 Oct 2005
On 7 Oct 2005, at 10:52, Kevin White wrote:

> Hi Folks,
>
> I am new here so forgive me if this has come up before, I couldn't  
> find anything in the archives so I thought I would post and get  
> some thoughts. I have a table structure with the following has_a  
> relationships:
>
> __PACKAGE__->has_a( expire_date => 'Time::Piece',
>     inflate => sub { Time::Piece->strptime( shift, "%Y-%m-%d" ) },
>     deflate => 'ymd',
> );
>
> __PACKAGE__->has_a( start_date => 'Time::Piece',
>     inflate => sub { Time::Piece->strptime( shift, "%Y-%m-%d" ) },
>     deflate => 'ymd',
> );
>
> (Code is unashamedly ripped from the CDBI docs)
>
> Trouble was I kept getting the following:
>
> Can't store CODE items at /Library/Perl/5.8.6/Class/DBI.pm line  
> 1039, <IN> line 79.
>
> The line in questions is:
>
>     my %hash = %{ dclone($class->__meta_info || {}) };

It's a bug in 3.0.9. Tony knows about it and is uploading a fix round  
about now.
The only question is whether the discarded primary key fix is  
incorporated too, and the answer is 'probably not' because I've got  
too much to do this morning :(

best

will



_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Multiple inflate CODE references
Kevin White 09:52 on 07 Oct 2005

Re: [CDBI] Multiple inflate CODE references
William Ross 10:11 on 07 Oct 2005

Generated at 10:29 on 10 Oct 2005 by mariachi v0.52