+if (exists $options{invalidate_state}) {
+ for my $invalidate_state (@{$options{invalidate_state}}) {
+ my ($method,$database,$keyword) = split /,/, $invalidate_state;
+ if (not exists $state{done_keywords}{$method}) {
+ print STDERR "Method '$method' does not exist, and cannot be invalidated\n";
+ }
+ elsif (not exists $state{done_keywords}{$method}{$database}) {
+ print STDERR "Database '$database' does not exist for method '$method', and cannot be invalidated\n";
+ }
+ elsif (not exists $state{done_keywords}{$method}{$database}{$keyword}) {
+ print STDERR "Keyword '$keyword' does not exist for database '$database' and method '$method', and cannot be invalidated\n";
+ }
+ else {
+ delete $state{done_keywords}{$method}{$database}{$keyword};
+ }
+ }
+}
+