From: Peter Rabbitson Date: Mon, 28 Jul 2014 08:26:46 +0000 (+0200) Subject: The merger failing is no longer a possibility after 8e40a627 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad25086a4a65be49110f740b501a1b856b66e91b;p=dbsrgits%2FDBIx-Class-Historic.git The merger failing is no longer a possibility after 8e40a627 Remove the useless try{} block --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 8f68daa..7f21daf 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -825,6 +825,7 @@ sub find { @{$call_cond}{@c_cols} = @_; } + # process relationship data if any for my $key (keys %$call_cond) { if ( length ref($call_cond->{$key}) @@ -847,6 +848,8 @@ sub find { } } + # add-in the resultset condition if any + ($call_cond) = $self->_merge_with_rscond($call_cond); my $alias = exists $attrs->{alias} ? $attrs->{alias} : $self->{attrs}{alias}; my $final_cond; @@ -939,17 +942,10 @@ sub _qualify_cond_columns { } sub _build_unique_cond { - my ($self, $constraint_name, $extra_cond, $croak_on_null) = @_; + my ($self, $constraint_name, $final_cond, $croak_on_null) = @_; my @c_cols = $self->result_source->unique_constraint_columns($constraint_name); - # combination may fail if $self->{cond} is non-trivial - my ($final_cond) = try { - $self->_merge_with_rscond ($extra_cond) - } catch { - +{ %$extra_cond } - }; - # trim out everything not in $columns $final_cond = { map { exists $final_cond->{$_}