[Bast-commits] r7045 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Jul 14 11:30:56 GMT 2009
Author: ribasushi
Date: 2009-07-14 11:30:55 +0000 (Tue, 14 Jul 2009)
New Revision: 7045
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Minor logic cleanup
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-07-14 04:54:14 UTC (rev 7044)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-07-14 11:30:55 UTC (rev 7045)
@@ -1315,9 +1315,12 @@
sub _switch_to_inner_join_if_needed {
my ($self, $from, $alias) = @_;
+ # subqueries and other oddness is naturally not supported
return $from if (
ref $from ne 'ARRAY'
||
+ @$from <= 1
+ ||
ref $from->[0] ne 'HASH'
||
! $from->[0]{-alias}
@@ -1325,10 +1328,6 @@
$from->[0]{-alias} eq $alias
);
- # this would be the case with a subquery - we'll never find
- # the target as it is not in the parseable part of {from}
- return $from if @$from == 1;
-
my $switch_branch;
JOINSCAN:
for my $j (@{$from}[1 .. $#$from]) {
More information about the Bast-commits
mailing list