From: Daniel Westermann-Clark Date: Tue, 18 Apr 2006 07:39:09 +0000 (-0400) Subject: Return the hash, not a ref X-Git-Tag: v0.07002~75^2~237^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a871b4be787cebd5e61411429d31a841ac227156;p=dbsrgits%2FDBIx-Class.git Return the hash, not a ref --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index a954f59..584ec96 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -335,11 +335,11 @@ sub find { my @unique_hashes; foreach my $name (@constraint_names) { my @unique_cols = $self->result_source->unique_constraint_columns($name); - my $unique_hash = $self->_unique_hash(\%hash, \@unique_cols); + my %unique_hash = $self->_unique_hash(\%hash, \@unique_cols); # TODO: Check that the ResultSet defines the rest of the query - push @unique_hashes, $unique_hash - if scalar keys %$unique_hash;# == scalar @unique_cols; + push @unique_hashes, \%unique_hash + if scalar keys %unique_hash;# == scalar @unique_cols; } # Add the ResultSet's alias @@ -383,7 +383,7 @@ sub _unique_hash { grep { exists $hash->{$_} } @$unique_cols; - return \%unique_hash; + return %unique_hash; } =head2 search_related