From: Matt S Trout Date: Mon, 17 Sep 2018 02:05:54 +0000 (+0000) Subject: decomplect _IDENT X-Git-Tag: v2.000000~3^2~458 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2c5dbe03473d1495dcbdffcfaf6f541a1147465;p=dbsrgits%2FSQL-Abstract.git decomplect _IDENT --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 91f5c3a..2ebccc7 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -901,21 +901,9 @@ sub _recurse_where { } sub _where_op_IDENT { - my $self = shift; - my ($op, $rhs) = splice @_, -2; - if (! defined $rhs or length ref $rhs) { - puke "-$op requires a single plain scalar argument (a quotable identifier)"; - } - - # in case we are called as a top level special op (no '=') - my $has_lhs = my $lhs = shift; + my ($self, undef, $ident) = @_; - $_ = $self->_convert($self->_quote($_)) for ($lhs, $rhs); - - return $has_lhs - ? "$lhs = $rhs" - : $rhs - ; + return $self->_convert($self->_quote($ident)); } sub _where_op_VALUE {