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/ +
_______________________________________________
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/dbix-class@lists.rawmode.org/