From: Matt S Trout Date: Sat, 14 Apr 2012 17:10:54 +0000 (+0000) Subject: factor out select logic a bit more X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4cb495db2a43f1a2bd60faa19f2eacbb54e273ad;p=dbsrgits%2FSQL-Abstract.git factor out select logic a bit more --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 3b61a58..aca4315 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -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)