From: Matt S Trout Date: Sat, 8 Sep 2018 16:33:52 +0000 (+0000) Subject: switch another literal case to -literal X-Git-Tag: v2.000000~3^2~493 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df251653d05178746a2c42d1e87c43b4569c0b3c;p=dbsrgits%2FSQL-Abstract.git switch another literal case to -literal --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index dfeb0f1..cd58ba7 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"; }