[Dbix-class] bug in CascadeActions->update for might_have that doesn't have one

Matt S Trout dbix-class at trout.me.uk
Sat Apr 8 19:47:31 CEST 2006


Mark Hedges wrote:
> 
> On Fri, 7 Apr 2006, Mark Hedges wrote:
> 
>> -    $_->update for $self->$rel;
>> +    $_->update for grep {$_} $self->$rel;
> 
> 
> Sorry, this is more efficient:
> 
>  $_->update for grep { defined } $self->$rel;

Or even

grep defined, $self->$rel;

which is what just went into trunk :)

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



More information about the Dbix-class mailing list