> My problem is in deflate:
> 
>>       $column =>
>>         {
>>           inflate => sub {
>>             my ($value, $obj) = @_;
>>             $obj->_datetime_parser->parse_datetime($value);
>>           },
>>           deflate => sub {
>>             my ($value, $obj) = @_;
>               $obj is not an object, just a class name during a 
> create_related calls?
>>             $obj->_datetime_parser->format_datetime($value);
>>           },
>>         }
> 
> 
> 
> Is it normal that the deflate sub get's a class name, and not an actuall
> blessed object for $obj?
> 
> -=Chris
> 

OK, The offending bits are:

>   if (my $parser = $self->__datetime_parser) {
>     return $parser;
>   }

from _datetime_parser() in InflateColumn::DateTime.

If it is indeed normal deflate subs to get a class and not an object,
then that line won't cut it because of the accessors trying to look at a
blessed hash.

If it's not normal for deflate subs to get class names instead of
objects for $obj, then something is quite amiss elsewhere.

Considering regular inflate/deflate works with my copy-item code, I'm
betting on the former here.

Someone who know more about the internals will have to chime in.

-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to