sub _where_to_dq {
my ($self, $where, $logic) = @_;
- # dispatch on appropriate method according to refkind of $where
- my $method = $self->_METHOD_FOR_refkind("_where_to_dq", $where);
-
- return $self->$method($where, $logic);
+ if (ref($where) eq 'ARRAY') {
+ return $self->_where_to_dq_ARRAYREF($where, $logic);
+ } elsif (ref($where) eq 'HASH') {
+ return $self->_where_to_dq_HASHREF($where, $logic);
+ } elsif (
+ ref($where) eq 'SCALAR'
+ or (ref($where) eq 'REF' and ref($$where) eq 'ARRAY')
+ ) {
+ return $self->_literal_to_dq($$where);
+ } elsif (!ref($where)) {
+ return $self->_value_to_dq($where);
+ }
+ die "Can't handle $where";
}
sub _where_to_dq_ARRAYREF {
};
}
-sub _where_to_dq_ARRAYREFREF {
- my ($self, $where) = @_;
- return $self->_literal_to_dq($$where);
-}
-
-sub _where_to_dq_SCALARREF {
- my ($self, $where) = @_;
- return $self->_literal_to_dq($$where);
-}
-
sub _where_to_dq_HASHREF {
my ($self, $where, $logic) = @_;