From: Matt S Trout Date: Mon, 17 Sep 2018 03:32:02 +0000 (+0000) Subject: lift undef checking out of _order_by_chunks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b6158af5ab58234925d4af4f4680656a7f124f7;p=scpubgit%2FQ-Branch.git lift undef checking out of _order_by_chunks --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index ba5b716..c288dac 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1062,6 +1062,8 @@ sub _open_outer_paren { sub _order_by { my ($self, $arg) = @_; + return '' unless defined($arg); + my @chunks = $self->_order_by_chunks($arg); my @sql; @@ -1094,10 +1096,6 @@ sub _order_by_chunks { if (!ref($arg)) { return +{ -ident => $arg }; } - if (!defined($arg)) { - # Seriously? - return - } if (ref($arg) eq 'HASH') { my ($key, $val, @rest) = %$arg;