patch by Norbert BUCHMULLER (order_by => undef)
Laurent Dami [Wed, 5 Nov 2008 23:52:56 +0000 (23:52 +0000)]
lib/SQL/Abstract.pm
t/06order_by.t

index c7199f1..90cf77d 100644 (file)
@@ -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)},
 
index 08477ec..1cf06c9 100644 (file)
@@ -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;