move _expand_not to method
[scpubgit/Q-Branch.git] / lib / SQL / Abstract.pm
index 5aaeee0..dd5544f 100644 (file)
@@ -193,8 +193,8 @@ sub new {
 
   $opt{expand} = {
     -ident => '_expand_ident',
-    -value => sub { +{ -bind => [ our $Cur_Col_Meta, $_[2] ] } },
-    -not => sub { +{ -op => [ 'not', $_[0]->_expand_expr($_[2]) ] } },
+    -value => '_expand_value',
+    -not => '_expand_not',
     -bool => sub {
       my ($self, undef, $v) = @_;
       if (ref($v)) {
@@ -917,6 +917,14 @@ sub _expand_ident {
   return +{ -ident => \@parts };
 }
 
+sub _expand_value {
+  +{ -bind => [ our $Cur_Col_Meta, $_[2] ] };
+}
+
+sub _expand_not {
+  +{ -op => [ 'not', $_[0]->_expand_expr($_[2]) ] };
+}
+
 sub _recurse_where {
   my ($self, $where, $logic) = @_;