fix DBIC ident op expander compat wrapper to handle call as unop
[dbsrgits/SQL-Abstract.git] / lib / SQL / Abstract.pm
index fdd6399..4fef402 100644 (file)
@@ -301,11 +301,11 @@ sub new {
         s/\A\s+//, s/\s+\Z// for $sql;
         return [ $sql, @bind ];
       };
-      $opt{expand_op}{ident} = sub {
+      $opt{expand_op}{ident} = __PACKAGE__->make_unop_expander(sub {
         my ($self, undef, $body) = @_;
         $body = $body->from if Scalar::Util::blessed($body);
         $self->_expand_ident(ident => $body);
-      };
+      });
     }
   }