From: Peter Rabbitson Date: Thu, 2 Jul 2009 11:47:41 +0000 (+0000) Subject: Make the code readable X-Git-Tag: v0.08108~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7d82e1cdbd8ab9c37fecd3f6952cb378659b4443;p=dbsrgits%2FDBIx-Class.git Make the code readable --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index f8bed0e..01a270f 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -973,9 +973,14 @@ sub _collapse_result { # hit by a smooth^Wempty left-joined resultset. Just noop in that case # instead of producing a {} # - # Note the double-defined - $row may be [ 0, '' ] - # - return undef unless ( defined List::Util::first { defined $_ } (@$row) ); + my $has_def; + for (@$row) { + if (defined $_) { + $has_def++; + last; + } + } + return undef unless $has_def; my @copy = @$row;