On 29 Jul 2005, at 11:31, Michael G Schwern wrote:
I've just implemented the oft requested Test::Builder::Module. Its a
superclass for all Test::Builder based modules that implements an
import()
method to match what Test::More does and a builder() method to get the
Test::Builder object.
Nice.
[snip]
Calling builder() is safer than Test::Builder->new as it is forward
compatible for a day when each module will be able to have its own
Test::Builder object rather than the strict singleton it is now.
[snip]
In that case should we be encouraging people to write
sub ok ($;$) {
Test::Simple->builder->ok(@_);
}
instead of using a package lexical, in case people want to swap
modules at runtime?
[snip]
What scaffolding do module authors find themselves implementing?
import() and builder() is all I can think of.
[snip]
Can't think of anything else that would belong in a base class.
Adrian