Matt S Trout wrote:
> On Mon, May 21, 2007 at 01:32:27PM -0400, Christopher H. Laco wrote:
>>> Sure, but it has to obey ->{accessor} (and you'll need to patch
>>> inflate_column
>>> to while you're there) and there'll need to be tests.
>> return map {$_ => $self->$_} $self->columns;
>>
>> Why do I have to patch inflate_column or care if I'm using the accessor?
>
> the $self->$_ may not be correct. accessor name may not match column name.
>
> column_info accessor key determines this for column accessor; inflate_column
> should obey this but I don't think currently does.
>
>>> Oh, and how do you propose to handle people wanting rels as well?
>> I don't, just like get_columns doesn't.
>>
>>> Or non-column attributes? (c.f. Oleg's horrible hack because he wanted to
>>> use get_columns on non-column things)
>>>
>> I don't, just like get_columns doesn't.
>>
>>
>> I'm proposing that get_inflated_columns is no smarter than get_columns
>> or than I get the objects instead of their values...
>
> Well, fair enough, but you're putting fuel on the fire of ::Core getting
> deprecated entirely in favour of something that doesn't need hacks like this.
>
Done. get_inflated_columns in Row with tests for {accessor}, inflated
objects (DateTime) and relationship where the rel acccessor is the same
name as the field (track.cd vs. 'cd' accessor )...
I have not touched inflate_column, or anything else we thing is
{accessor} broken until I understand better what wrong is...
-=Chris
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]/
