From: Laurent Dami Date: Wed, 5 Nov 2008 23:52:56 +0000 (+0000) Subject: patch by Norbert BUCHMULLER (order_by => undef) X-Git-Tag: v1.70~271 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6475fb17ae3adba871ea4a1b53b4d212a0f6c82;p=dbsrgits%2FSQL-Abstract.git patch by Norbert BUCHMULLER (order_by => undef) --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c7199f1..90cf77d 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -711,6 +711,7 @@ sub _order_by { }, SCALAR => sub {$self->_quote($arg)}, + UNDEF => sub {}, SCALARREF => sub {$$arg}, # literal SQL, no quoting HASHREF => sub {$self->_order_by_hash($arg)}, diff --git a/t/06order_by.t b/t/06order_by.t index 08477ec..1cf06c9 100644 --- a/t/06order_by.t +++ b/t/06order_by.t @@ -44,6 +44,11 @@ my @cases = expects => ' ORDER BY colA, colB DESC', expects_quoted => ' ORDER BY `colA`, `colB` DESC', }, + { + given => undef, + expects => '', + expects_quoted => '', + }, ); my $sql = SQL::Abstract->new;