[Dbix-class] Feature
request for DBIx::Class::InflateColumn::inflate_column
Christopher H. Laco
claco at chrislaco.com
Fri Oct 27 23:32:51 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/ =3D> {
>> inflate =3D> sub { Some:Class->inflate },
>> deflate =3D> sub { shift->deflate },
>> });
> =
> What does this buy us over
> =
> __PACKAGE__->inflate_column($_ =3D> {
> inflate =3D> sub { Some:Class->inflate },
> deflate =3D> sub { shift->deflate },
> }) for qw/col1 col2 col3/;
> =
> ?
> =
Well, no more than:
__PACKAGE__->mk_group_accessors(qw/a b b/);
gains us over:
__PACKAGE__->mk_group_accessor($_) for qw/col1 col2 col3/;
:-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://jules.scsys.co.uk/pipermail/dbix-class/attachments/20061027/95=
e71045/signature.pgp
More information about the DBIx-Class
mailing list