From: Matt S Trout Date: Mon, 17 Sep 2018 02:05:54 +0000 (+0000) Subject: decomplect _IDENT X-Git-Tag: v1.90_01~437 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9cf28dfb77616a5e8ab85501576aae71f327047e;p=dbsrgits%2FSQL-Abstract.git decomplect _IDENT --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 66ecd3e..6bb12cc 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 {