From: Daniel Westermann-Clark Date: Sun, 28 May 2006 00:06:02 +0000 (+0000) Subject: Another minor cleanup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7632d88372764b7d003c3f29930545d09523db10;p=dbsrgits%2FDBIx-Class-Historic.git Another minor cleanup --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 3d331d3..f409567 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -316,13 +316,9 @@ sub find { my @unique_queries = $self->_unique_queries($input_query, $attrs); # use Data::Dumper; warn Dumper $self->result_source->name, $input_query, \@unique_queries, $self->{attrs}->{where}; - # Verify the query - my $query = \@unique_queries; - if (scalar @unique_queries == 0) { - # Handle cases where the ResultSet defines the query, or where the user is - # abusing find - $query = $input_query; - } + # Handle cases where the ResultSet defines the query, or where the user is + # abusing find + my $query = @unique_queries ? \@unique_queries : $input_query; # Run the query if (keys %$attrs) {