(ref $_ ne 'ARRAY' or !@$_) and $_ = [ -and => $_ ] for ($l, $r);
- if (@$l and @$r and $l->[0] eq $r->[0] and $l->[0] eq '-and') {
+ if (@$l and @$r and $l->[0] eq $r->[0] and $l->[0] =~ /^\-and$/i) {
$fin->{$col} = [ -and => map { @$_[1..$#$_] } ($l, $r) ];
}
else {
unshift @$pairs, $lhs => $rhs->[1];
}
else {
- push @conds, { $lhs => $rhs };
+ push @conds, { $lhs => [ @{$rhs}[1..$#$rhs] ] };
}
}
elsif (@$rhs == 1) {