KeyMangler example app
[scpubgit/DKit.git] / lib / DX / RuleSet.pm
index f0ee6ed..ba0f3c5 100644 (file)
@@ -14,7 +14,6 @@ use DX::Op::ProposeAction;
 use DX::Op::ModifyAction;
 use DX::Op::Materialize;
 use DX::Op::Prop;
-use DX::Op::Exists;
 use DX::Op::Predicate;
 use DX::Op::HasAction;
 use DX::Op::FindAll;
@@ -73,19 +72,19 @@ sub _expand_op_cut { return DX::Op::Cut->new }
 sub _expand_op_fail { return DX::Op::Backtrack->new }
 
 sub _expand_op_not {
-  my ($self, @contents) = @_;
+  my ($self, $contents) = @_;
   my $cut = DX::Op::Cut->new(next => DX::Op::Backtrack->new);
   DX::Op::Not->new(
-    body => $self->expand_and_link($cut, @contents)
+    body => $self->expand_and_link($cut, @$contents)
   );
 }
 
 sub _expand_op_findall {
-  my ($self, $coll_name, $var_name, @contents) = @_;
+  my ($self, $coll_name, $var_name, $contents) = @_;
   DX::Op::FindAll->new(
     coll_name => $coll_name,
     var_name => $var_name,
-    body => $self->expand_and_link(DX::Op::Return->new, @contents),
+    body => $self->expand_and_link(DX::Op::Return->new, @$contents),
   );
 }
 
@@ -149,14 +148,6 @@ sub _expand_op_prop {
   DX::Op::Prop->new(%new);
 }
 
-sub _expand_op_exists {
-  my ($self, $vars, @body) = @_;
-  DX::Op::Exists->new(
-    vars => $vars,
-    body => $self->expand_and_link(DX::Op::Return->new, @body)
-  );
-}
-
 sub _expand_op_has_action {
   my ($self, @args) = @_;
   DX::Op::HasAction->new(arg_spec => \@args);