On Saturday, October 26, 2002, at 04:22  pm, Nicholas Clark wrote:
[snip]
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.
[snip]

Belated response... but the END block solution doesn't seem that nasty to me. What problems do you see for production code?

You might want to have a chat to Janek Schleicher since his Test::ManyParams also sets the pseudo-random seed. It would be nice if your modules could play nice together :-)

Cheers,

Adrian

PS Or you could use Test::Class and stick the print in the DESTROY method for the class :-)



Reply via email to