From: Matt S Trout Date: Sat, 8 Sep 2018 16:33:52 +0000 (+0000) Subject: switch another literal case to -literal X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d64004f36ccaf869eaa059d153df080e16ff1e4;p=scpubgit%2FQ-Branch.git switch another literal case to -literal --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 232b290..d0aae08 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -585,9 +585,9 @@ sub _expand_expr { sub _expand_expr_hashpair { my ($self, $k, $v, $logic) = @_; unless (defined($k) and length($k)) { - if (defined($k) and is_literal_value($v)) { + if (defined($k) and my $literal = is_literal_value($v)) { belch 'Hash-pairs consisting of an empty string with a literal are deprecated, and will be removed in 2.0: use -and => [ $literal ] instead'; - return $v; + return { -literal => $literal }; } puke "Supplying an empty left hand side argument is not supported"; }