On Wednesday 25 June 2003 17:49, Adrian Howard wrote: > The thread from the start of May about having optional / extendable > plans supported by Test::Harness would seem to be a good match for this > feature. > > http://archive.develooper.com/[EMAIL PROTECTED]/msg01883.html (Plan is > YAGNI) > > Test::Warn::None could then just extend the plan in the END block with > no worries about mucking up existing plans.
I forgot about that stuff. I just thought of a big problem with plan extensions. If the script silently eat's itself just before you extend the plan, then you don't know that anything went wrong. The problem is that counting the number of tests in a script is usually somewhere between awkward and impossible. Extendable plans make the symptoms go away but they also make some of the benefits of plans go away too. Subblocks and subplans accomplish the same thing without any loss of plan-strictness. Of course that still doesn't solve the problem of END block plans but at least now all the tests in an END block can be grouped together with their own subplan and you only need to add 1 to the overall plan. It also makes skip and todo blocks very easy too, as long as all the tests to be skipped are in a sub-block then it's as if you're just skipping 1 test. > (Nice module BTW - and my vote is for Test::NoWarnings as the name :-) Thanks. I did decide to Test::NoWarnings but then I thought again. I think I'm going to roll my own version of Test::Warn (maybe Test::Warnings). Three main reasons: - Test::Warn has a lot of dependencies - Array::Compare, Test::Exception, Sub::Uplevel, Tree::DAG_Node (!), File::Spec - I want to capture the warnings in more detail - I have no job! I may as well be gainfully unemployed. When it's done, maybe I can persuade Janek Schleicher to inegrate it into Test::Warn, F