projects
/
scpubgit/DKit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
factor action execution out into solver method
[scpubgit/DKit.git]
/
lib
/
DX
/
Solver.pm
diff --git
a/lib/DX/Solver.pm
b/lib/DX/Solver.pm
index
e94e050
..
2042a10
100644
(file)
--- a/
lib/DX/Solver.pm
+++ b/
lib/DX/Solver.pm
@@
-36,4
+36,12
@@
sub query {
);
}
+sub run_action {
+ my ($self, $action) = @_;
+ my @invalidate = $action->run;
+ while (my ($type, $value) = splice @invalidate, 0, 2) {
+ $self->facts->{$type}->remove_value($value);
+ }
+}
+
1;