From: Matt S Trout Date: Mon, 17 Sep 2018 01:29:49 +0000 (+0000) Subject: remove vestigial ANDOR op X-Git-Tag: v1.90_01~446 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ebc0a9c88be9cae260e62b6966ee5506827e86c;p=dbsrgits%2FSQL-Abstract.git remove vestigial ANDOR op --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index e68fbe2..e4e921b 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1096,46 +1096,6 @@ sub _where_unary_op { return ($sql, @bind); } -sub _where_op_ANDOR { - my ($self, $op, $v) = @_; - - $self->_SWITCH_refkind($v, { - ARRAYREF => sub { - return $self->_where_ARRAYREF($v, $op); - }, - - HASHREF => sub { - return ($op =~ /^or/i) - ? $self->_where_ARRAYREF([ map { $_ => $v->{$_} } (sort keys %$v) ], $op) - : $self->_where_HASHREF($v); - }, - - SCALARREF => sub { - puke "-$op => \\\$scalar makes little sense, use " . - ($op =~ /^or/i - ? '[ \$scalar, \%rest_of_conditions ] instead' - : '-and => [ \$scalar, \%rest_of_conditions ] instead' - ); - }, - - ARRAYREFREF => sub { - puke "-$op => \\[...] makes little sense, use " . - ($op =~ /^or/i - ? '[ \[...], \%rest_of_conditions ] instead' - : '-and => [ \[...], \%rest_of_conditions ] instead' - ); - }, - - SCALAR => sub { # permissively interpreted as SQL - puke "-$op => \$value makes little sense, use -bool => \$value instead"; - }, - - UNDEF => sub { - puke "-$op => undef not supported"; - }, - }); -} - sub _where_op_NEST { my ($self, $op, $v) = @_;