X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSQLMaker.pm;h=e7dd9f17dec5cf67bc3b75940a974120d2eaff79;hb=refs%2Fheads%2Fwip%2Forder_by_nulls_dbic_portion;hp=ea69e076afef6504d8eb63d19adebad72a8128d6;hpb=e50536940adf2ebaef907a0c29ae37fbd5ce95b1;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/SQLMaker.pm b/lib/DBIx/Class/SQLMaker.pm index ea69e07..e7dd9f1 100644 --- a/lib/DBIx/Class/SQLMaker.pm +++ b/lib/DBIx/Class/SQLMaker.pm @@ -445,11 +445,12 @@ sub _split_order_chunk { my ($self, $chunk) = @_; # strip off sort modifiers, but always succeed, so $1 gets reset - $chunk =~ s/ (?: \s+ (ASC|DESC) )? \s* $//ix; + $chunk =~ s/ (?: \s+ (ASC|DESC) )? (?: \s+ NULLS \s+ (FIRST|LAST) )? \s* $//ix; return ( $chunk, ( $1 and uc($1) eq 'DESC' ) ? 1 : 0, + $2 ? uc($2) : undef ); }