On Tue, 2005-03-08 at 20:40 +0000, Fergal Daly wrote:

> By singleton do you mean that there's only ever 1 Test::Builder::Counter and
> it's shared between all the Test::Builder objects?

By default there's only one.  You can create others, if necessary.

> One way to allow this is to have a singleton Test::Builder and multiple
> Test::Builder::Run objects and Test::Builder can decide which
> Test::Builder::Run object is "live". This effectively what Test::Tester
> does.

That's what I have in mind.

> That will lose the default level management. But I don't really understand
> the default level thing. The level has to be cumulative across test modules,
> incrementing for each subroutine call. What does it mean for Test::D to have
> a default level of 2? And what happens if Test::C::do_multiple_tests() calls
> into Test::D?

The level is the number of entries in the call stack that a test module
puts between where users use the test function and where Test::Builder
receives the results.  It tells Test::Builder how many frames to discard
when reporting failure files and lines.

-- c

Reply via email to