);
}
+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;
scalar(my ($action) = $res[0]->actions), 1
);
-my ($type, $value) = $action->run;
-
-$solver->facts->{$type}->remove_value($value);
+$solver->run_action($action);
ok(!$path_status{'.ssh'}, 'Empty retracted');
is(scalar(my ($poss) = grep !@{$_->dependencies}, @act), 1, 'One possible');
-($type, $value) = $poss->run;
-
-$solver->facts->{$type}->remove_value($value);
+$solver->run_action($poss);
@res = keys_file()->results;
'One possible'
);
-($type, $value) = $poss->run;
-
-$solver->facts->{$type}->remove_value($value);
+$solver->run_action($poss);
@res = keys_file()->results;