my $cond = (@_
? (
(@_ == 1 || ref $_[0] eq "HASH")
- ? shift
+ ? (
+ (ref $_[0] eq 'HASH')
+ ? (
+ (keys %{ $_[0] } > 0)
+ ? shift
+ : undef
+ )
+ : shift
+ )
: (
(@_ % 2)
? $self->throw_exception("Odd number of arguments to search")
}
: $where);
}
+
if (defined $cond) {
$new_attrs->{where} = (
defined $new_attrs->{where}