On Tue, Mar 08, 2005 at 05:05:02PM -0500, David Golden wrote: > The use case I've been pondering is to be able to better control the > granularity of my tests within a particular scripts. Stuff like > Test::Class and Test::Block gets closer but not quite to what I would > like. I'd like to be able to define a "block" of tests and either > report that the whole block succeeded or else show me that it failed > with a diagnostic about the individual tests within it. In effect, I'd > like to be able to localize "verbosity". I'm in the middle of cobbling > up a module to do it -- the approach I have in mind is storing the > blocks as a code reference, running the first block (in an eval to trap > dies), storing away a copy of the Test::Builder results, resetting > Test::Builder, running the next, etc., etc., then at the end resetting > Test::Builder one final time and passing/failing for each result set > (with diagnostics that show the verbose results of the individual tests > passing or failing.) Since I'm trying test-first development, I'm > currently hung up in the middle of figuring out how to test that it's > doing the what I want before I write it. I think the approach works, > but all this mucking about in the internals of Test::Builder feels like > voodoo.
It is. You're a perfect candidate for create(). You can grab the latest version from svn.schwern.org and try it out.