$val = $arg->{$key};
} elsif ($key =~ /^-nulls$/i) {
$nulls = $arg->{$key};
- puke "invalid value for -nulls" unless $nulls =~ /^(?:first|last)$/;
+ puke "invalid value for -nulls" unless $nulls =~ /^(?:first|last)$/i;
} else {
puke "invalid key in hash passed to _order_by";
}
bind => [qw/test tost/],
},
{
- given => [ { -asc => 'colA', -nulls => 'first' }, { -desc => 'colB', -nulls => 'last' } ],
+ given => [ { -ASC => 'colA', -NULLS => 'FIRST' }, { -DESC => 'colB', -NULLS => 'LAST' } ],
expects => ' ORDER BY colA ASC NULLS FIRST, colB DESC NULLS LAST',
expects_quoted => ' ORDER BY `colA` ASC NULLS FIRST, `colB` DESC NULLS LAST',
},