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-Tag: v2.000000~3^2~454 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdc8d5271c425ab17892d09ca7515a0ffa21f1b2;p=dbsrgits%2FSQL-Abstract.git lift undef checking out of _order_by_chunks --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index fc50257..ebec784 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;