Subject: | PATCH: improve docs for apply_state and add explicit return value |
What I started to report was a "wish" to be able to query the "state"
without running anything. For example, perhaps I'd like to manually
review the list of failed tests, so I can pick out just one of them to run.
What I ended up with this patch to improve the docs for "apply_state" to
make it clearer what happens -- the previous docs made it look like it
actually runs tests, which it doesn't. I also added an explicit return a
"Perl Best Practice".
Subject: | apply_state.patch |
Fri Oct 24 11:24:47 EDT 2008 mark@summersault.com
* Update App::Prove::State with improve docs and explicit 'return';
diff -rN -u old-saveapet/perllib/App/Prove/State.pm new-saveapet/perllib/App/Prove/State.pm
--- old-saveapet/perllib/App/Prove/State.pm 2008-10-24 11:30:38.000000000 -0400
+++ new-saveapet/perllib/App/Prove/State.pm 2008-10-24 11:30:50.000000000 -0400
@@ -127,7 +127,13 @@
=head3 C<apply_switch>
-Apply a list of switch options to the state.
+ $self->apply_switch('failed,save');
+
+Apply a list of switch options to the state, updating the internal object state
+as a result. Nothing is return.
+
+Diagnostics:
+ - "Illegal state option: %s"
=over
@@ -252,6 +258,7 @@
|| croak "Illegal state option: $opt";
$code->($arg);
}
+ return;
}
sub _select {