my $direction = $1;
- my (@sql, @bind);
+ my @ret;
for my $c ($self->_order_by_chunks ($val)) {
-
-
+ my ($sql, @bind);
$self->_SWITCH_refkind ($c, {
SCALAR => sub {
- push @sql, $c
+ $sql = $c;
},
ARRAYREF => sub {
- my ($s, @b) = @$c;
- push @sql, $s;
- push @bind, @b;
+ ($sql, @bind) = @$c;
},
});
- }
- my $sql = join ', ', map { $_ . ' ' . $self->_sqlcase($direction) } @sql;
+ $sql = $sql . ' ' . $self->_sqlcase($direction);
+
+ push @ret, [ $sql, @bind];
+ }
- return [$sql, @bind];
+ return @ret;
},
});
}