[Dbix-class] get_columns/get_inflated_columns

Christopher H. Laco claco at chrislaco.com
Mon May 21 19:34:32 GMT 2007


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 {$_ =3D> $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_col=
umn
> should obey this but I don't think currently does.


Ah yes, the accessor alias, forgot about that one. :-/
Easy enough to work in...

>  =

>>> 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 t=
his.
> =


Well, that's ok too. I like fire. :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070521/24=
03f865/signature-0001.pgp


More information about the Dbix-class mailing list