croak "Malformed select argument - too many keys in hash: " . join (',', keys %$fields );
}
+ $func =~ s/^\-+//; # strip leading dash, at some point the dash itself should become mandatory
+
if (lc ($func) eq 'distinct' && ref $args eq 'ARRAY' && @$args > 1) {
croak (
'The select => { distinct => ... } syntax is not supported for multiple columns.'
]);
}
+sub _order_by_chunks {
+ my ($self, $arg) = @_;
+ if ( # non-empty hash with neither an -asc or a -desc
+ ref $arg eq 'HASH'
+ &&
+ keys %$arg
+ &&
+ ! exists $arg->{-desc}
+ &&
+ ! exists $arg->{-asc}
+ ) {
+ return $self->_recurse_fields ($arg);
+ }
+
+ return $self->SUPER::_order_by_chunks ($arg);
+}
+
sub _table {
my ($self, $from) = @_;
if (ref $from eq 'ARRAY') {