On Mon, Feb 02, 2004 at 03:53:00PM -0800, chromatic wrote: > On Mon, 2004-02-02 at 15:46, Adrian Howard wrote: > > > However, I was wondering if anybody else ever wanted to do this sort of > > thing and, if so, would a more generic API to the test name be useful - > > e.g. localising something like $Test::Builder::Test_name? > > > > If so, I can probably be persuaded to write a patch - if not I'll shut > > up and go away :-) > > I'd rather print less if I don't really care what the name is, though I > don't feel exceedingly strongly that way. It just seems that a default > test name is there only to have a test name, not because it provides any > useful information.
This was my initial reaction, but I think we got the wrong impression. I gather this is not about having one default name for every test in your program. That would be silly. Rather this is defaults for blocks of tests. In the Test::Class context, the default name would extend only to a given test method. So you could have a default name which is, for example, the name of the test method. Or something like, "testing X feature". Other Test modules don't have such well defined blocks, so I don't know how well they'd fit in. As for providing a Test::Builder default, for the time being just override ok(). I don't think anything more than that is necessary at this point. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ Please Captain, not in front of the Klingons.