From: Matt S Trout Date: Tue, 4 Jul 2006 04:00:22 +0000 (+0000) Subject: reverted commit that should have gone on branches/subselect X-Git-Tag: v0.07002~77 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c2c2b633053551e3c05363e20612ca8cda687ef;p=dbsrgits%2FDBIx-Class.git reverted commit that should have gone on branches/subselect --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 797375f..e70d87c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -128,17 +128,14 @@ sub _recurse_from { my @sqlf; push(@sqlf, $self->_make_as($from)); foreach my $j (@join) { - push @sqlf, ', ' . $self->_quote($j) and next unless ref $j; - push @sqlf, ', ' . $$j and next if ref $j eq 'SCALAR'; - my ($to, $on) = @$j; # check whether a join type exists my $join_clause = ''; if (ref($to) eq 'HASH' and exists($to->{-join_type})) { - $join_clause = $self->_sqlcase(' ' . $to->{-join_type} . ' JOIN '); + $join_clause = ' '.uc($to->{-join_type}).' JOIN '; } else { - $join_clause = $self->_sqlcase(' JOIN '); + $join_clause = ' JOIN '; } push(@sqlf, $join_clause); @@ -147,18 +144,17 @@ sub _recurse_from { } else { push(@sqlf, $self->_make_as($to)); } - push(@sqlf, $self->_sqlcase(' ON '), $self->_join_condition($on)); + push(@sqlf, ' ON ', $self->_join_condition($on)); } return join('', @sqlf); } sub _make_as { my ($self, $from) = @_; - return $self->_quote($from) unless ref $from; - return $$from if ref $from eq 'SCALAR'; return join(' ', map { (ref $_ eq 'SCALAR' ? $$_ : $self->_quote($_)) } reverse each %{$self->_skip_options($from)}); } + sub _skip_options { my ($self, $hash) = @_; my $clean_hash = {};