I'm intending to write a module to work with Test::More to provide repeatable
"random" tests (ie take advantage of the pseudo random nature of rand).
I discussed it with Schwern at YAPC::EU and he thinks it will work.

However, I'd like to be able to cleanly print out my random number seed to
STDERR (or whatever Test::Builder's correct name for this is) if it believes
that any tests have failed, and I can't see a clean way to do this.
When I was experimenting with this idea at work I hacked things by having an
END block that checked $?, and if it was non-zero printing out the seed.
However, this doesn' seem to be a good idea for production code.

Is there a way to achieve such a callback from Test::Builder? It looks like
there isn't, as the logical place would be in Test::Builder::_ending after
it has worked out the number of passing and failing tests. If so, could I
make a feature request for some way to register such a callback.

Nicholas Clark
-- 
Brainfuck better than perl?     http://www.perl.org/advocacy/spoofathon/

Reply via email to