From: David Kamholz Date: Tue, 4 Jul 2006 02:39:17 +0000 (+0000) Subject: small fix X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3efb63cd0effbe507b7cf7944b6d2010158000f1;p=dbsrgits%2FDBIx-Class-Historic.git small fix --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index f4e7f96..55f0098 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1605,9 +1605,8 @@ sub related_resultset { "' has no such relationship $rel") unless $rel_obj; - my $alias = $self->_resolved_attrs->{seen_join}{$rel} - ? join('_', $rel, $self->_resolved_attrs->{seen_join}{$rel}+1) - : $rel; + my $join_count = $self->_resolved_attrs->{seen_join}{$rel}; + my $alias = $join_count ? join('_', $rel, $join_count+1) : $rel; my @live_join_stack = (@{$self->{attrs}{_live_join_stack}||[]}, $rel);