- $sortstring .= 'substr($orderby, 1)';
- if ($order eq '+') {
- $sortstring .= ", ORDER => 'ASC'";
- } elsif ($order eq '-') {
- $sortstring .= ", ORDER => 'DESC'";
- }
- } else {
- $sortstring .= '$orderby';
+ # remove the +/- sorting sigil
+ substr($orderby, 0, 1, '');
+
+ if ($order eq '+') {
+ $args{ORDER} = 'ASC';
+ }
+ elsif ($order eq '-') {
+ $args{ORDER} = 'DESC';
+ }