factor out select logic a bit more
Matt S Trout [Sat, 14 Apr 2012 17:10:54 +0000 (17:10 +0000)]
lib/SQL/Abstract.pm

index 3b61a58..aca4315 100644 (file)
@@ -361,14 +361,17 @@ sub _select_list_to_dq {
 
   return +{
     type => DQ_SELECT,
-    select => [
-      map $self->_select_field_to_dq($_),
-        ref($fields) eq 'ARRAY' ? @$fields : $fields
-    ],
+    select => [ $self->_select_field_list_to_dq($fields) ],
     from => $from_dq,
   };
 }
 
+sub _select_field_list_to_dq {
+  my ($self, $fields) = @_;
+  map $self->_select_field_to_dq($_),
+    ref($fields) eq 'ARRAY' ? @$fields : $fields;
+}
+
 sub _select_field_to_dq {
   my ($self, $field) = @_;
   ref($field)