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 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/ +

_______________________________________________
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