[Dbix-class] Feature request for
DBIx::Class::InflateColumn::inflate_column
Matt S Trout
dbix-class at trout.me.uk
Sat Oct 28 16:08:53 GMT 2006
Bernhard Graf wrote:
> On Saturday 28 October 2006 00:19, Matt S Trout wrote:
>
>>> __PACKAGE__->inflate_column(qw/col1 col2 col3/ => {
>>> inflate => sub { Some:Class->inflate },
>>> deflate => sub { shift->deflate },
>>> });
>> What does this buy us over
>>
>> __PACKAGE__->inflate_column($_ => {
>> inflate => sub { Some:Class->inflate },
>> deflate => sub { shift->deflate },
>> }) for qw/col1 col2 col3/;
>>
>> ?
>
> Buys us readability and saves us a little typing and few CPU-Cycles ;-)
> I would think. At least it doesn't hurt. ;-)
I'll take the readability argument, although:
Wouldn't it be easier to just allow inflation data in add_columns ?
Or both :)
Anybody wishing to work up a patch and tests to implement either is welcome to
do so, commit bit to -current available to apply it and maintain it when done.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list