X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract.pm;fp=lib%2FSQL%2FAbstract.pm;h=102958f4cae94b0194e53a9247298dd2786281b5;hb=f5aab26e2b99e10c82871a0f36a9e4773684ade7;hp=af8716ae683b43228daf6239628b7ff750752f48;hpb=fab2e3526a4a984ab9089ef9addc398a1b02f379;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index af8716a..102958f 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -143,7 +143,8 @@ clause) to try and simplify things. use Carp; use strict; -our $VERSION = '1.22'; +our $VERSION = '1.23'; +#XXX don't understand this below, leaving it for someone else. did bump the $VERSION --groditi our $REVISION = '$Id$'; our $AUTOLOAD; @@ -852,9 +853,10 @@ sub _order_by { my $_order_hash = sub { local *__ANON__ = '_order_by_hash'; my ($col, $order); - if ( $col = $_->{-desc} ) { + my $hash = shift; # $_ was failing in some cases for me --groditi + if ( $col = $hash->{'-desc'} ) { $order = 'DESC' - } elsif ( $col = $_->{-asc} ) { + } elsif ( $col = $hash->{'-asc'} ) { $order = 'ASC'; } else { puke "Hash must have a key of '-desc' or '-asc' for ORDER BY"; @@ -1360,7 +1362,7 @@ so I have no idea who they are! But the people I do know are: Eric Kolve (hashref "AND" support) Mike Fragassi (enhancements to "BETWEEN" and "LIKE") Dan Kubb (support for "quote_char" and "name_sep") - Guillermo Roditi (patch to cleanup "IN" and "BETWEEN") + Guillermo Roditi (patch to cleanup "IN" and "BETWEEN", fix and tests for _order_by) Thanks!