From: Matt S Trout Date: Wed, 12 Sep 2018 00:31:15 +0000 (+0000) Subject: notreached at base of expand_expr X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=252518da6dca19291c224a99b27e680622e4c2f1;p=scpubgit%2FQ-Branch.git notreached at base of expand_expr --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index d83da8c..c554b5e 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -540,6 +540,7 @@ sub where { sub _expand_expr { my ($self, $expr, $logic) = @_; + return undef unless defined($expr); if (ref($expr) eq 'HASH') { if (keys %$expr > 1) { $logic ||= 'and'; @@ -579,7 +580,11 @@ sub _expand_expr { if (my $literal = is_literal_value($expr)) { return +{ -literal => $literal }; } - return $expr; + if (!ref($expr)) { + return +{ -value => $expr }; + } + #::Ddie([ HUH => $expr ]); + die "notreached"; } sub _expand_expr_hashpair {