X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBIHacks.pm;h=331474f134f5845cff0896b7c6ac6b95208f876a;hb=037e8dca0dd1700345e2a36f78b399b59b8de99a;hp=dd536552470e4d5c2a4b93f5ffc97f8184704a2d;hpb=b0267fb70f1374d43e4512d8d1006d9f6fd3500b;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index dd53655..331474f 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -459,13 +459,17 @@ sub _strip_cond_qualifiers { for (my $i = 0; $i < @cond; $i++) { my $entry = $cond[$i]; my $hash; - if (ref $entry eq 'HASH') { + my $ref = ref $entry; + if ($ref eq 'HASH' or $ref eq 'ARRAY') { $hash = $self->_strip_cond_qualifiers($entry); } - else { + elsif (! $ref) { $entry =~ /([^.]+)$/; $hash->{$1} = $cond[++$i]; } + else { + $self->throw_exception ("_strip_cond_qualifiers() is unable to handle a condition reftype $ref"); + } push @{$cond->{-and}}, $hash; } }