I've just had a quick look at your test.t from Exporter-VA-1.2.3. Annoying comments/suggestions follow. Feel free to ignore :-)
I would strongly consider using Test::More and Test::Builder. It handles all the book keeping on test headers, footers and exit values for you. Implementing verbose and vv with Test::Builder is trivial.
You don't need the "#" after the "ok" and "not out" outputs. Currently the "#" character is used to indicate special kinds of test failure/success ("# skip" & "# TODO" tests). While Test::Harness copes happily with the "#" in other circumstances I would avoid it unless you are dealing with one of these special cases - just for the sake of clarity.
Consider testing the environment variable TEST_VERBOSE as well as your -verbose flag. That way you can do make test TEST_VERBOSE=1 to get your debug code.
The case when the code passed to verify dies should cause a failed test, rather than a printed error message. Conceptually the test (does this code produce this result) has failed.
Matter of personal style, but I would do:
{ package C1; use M1 v1.0 qw/--verbose_import &foo bar baz quux bazola
+ $ztesch --dump/ }
verify "C1::foo (5)", "Called M1::foo (5).";
...
instead of
package C1;
use M1 v1.0 qw/--verbose_import &foo bar baz quux bazola $ztesch --dum
+p/;
sub verify;
*verify= \&main::verify;
verify "C1::foo (5)", "Called M1::foo (5).";
...
to save having to alias verify into each module. |