[Dbix-class] DBIx::Class::HTMLWidget (checkboxes)
Brian Kirkbride
brian.kirkbride at deeperbydesign.com
Fri Jul 14 19:24:14 CEST 2006
Aaron Crane wrote:
> A. Pagaltzis writes:
>> So the right way to write that code “fancily” is thus:
>>
>> my %cb = map {
>> $_->isa( 'HTML::Widget::Element::Checkbox' )
>> ? ( $_->name => undef )
>> : ()
>> } @{ $result->{_elements} };
>
> I think this is much easier to read:
>
> my %cb = map { $_->name => undef }
> grep { $_->isa('HTML::Widget::Element::Checkbox') }
> @{ $result->{_elements} };
>
I agree, that's in a patch I sent to this list a few weeks ago.
More information about the Dbix-class
mailing list