switch to direct from list expansion
Matt S Trout [Mon, 23 Sep 2019 02:41:43 +0000 (02:41 +0000)]
lib/SQL/Abstract/ExtraClauses.pm

index 22817ce..808ff0d 100644 (file)
@@ -61,7 +61,7 @@ sub apply_to {
   });
 
   $sqla->clause_expanders(
-    'update.from' => $self->cb('_expand_select_clause_from'),
+    'update.from' => $self->cb('_expand_from_list'),
     'delete.using' => $self->cb('_expand_from_list'),
     'insert.rowvalues' => $self->cb(sub {
       +(from => $_[0]->expand_expr({ -values => $_[2] }));
@@ -111,7 +111,7 @@ sub apply_to {
   $sqla->expander(cast => $self->cb('_expand_cast'));
 
   $sqla->clause_expanders(
-    "select.from", $self->cb('_expand_select_clause_from'),
+    "select.from", $self->cb('_expand_from_list'),
     "update.target", $self->cb('_expand_update_clause_target'),
     "update.update", $self->cb('_expand_update_clause_target'),
   );
@@ -131,11 +131,6 @@ sub _expand_select {
   return $exp;
 }
 
-sub _expand_select_clause_from {
-  my ($self, undef, $from) = @_;
-  +(from => $self->_expand_from_list(undef, $from));
-}
-
 sub _expand_from_list {
   my ($self, undef, $args) = @_;
   if (ref($args) eq 'HASH') {