[Dbix-class] Feature request for DBIx::Class::InflateColumn::inflate_column

Ash Berlin ash at cpan.org
Fri Oct 27 23:40:42 BST 2006


Matt S Trout wrote:
> Bernhard Graf wrote:
>> In most cases I use the same inflator for multiple columns in a table.
>> So instead of calling inflate_column with the same attributes for each 
>> column, I'd like to write
>>
>> __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/;
> 
> ?
> 

Matt: You're forgetting that not everyone has a penchant for writing 
lisp in perl ;)



More information about the DBIx-Class mailing list