On Mon, 2007-11-19 at 17:08 -0600, Andy Lester wrote:
> On Nov 19, 2007, at 5:04 PM, A. Pagaltzis wrote:
> 
> > A deferred plan is clearly not as good as a predeclared plan,
> > but is definitely much safer than no plan at all.
>
> But what if something blows up before getting to the deferred plan?   
> Then you don't know.  You've bypassed having a plan.

More information is better than less information.

Consider the case where you want to run n + 10 tests.  With blocks in a
deferred plan, you can't be entirely sure that n is correct, but you can
be sure that the other 10 tests did run.  Not perfect, but better than
just saying "1..63" at the end and not knowing if the "+ 10" is included
in that 63.  

Secondly, perhaps it's possible to refactor the test to turn an entire
"block" of TAP into a single test.  Compare "files_are_valid(@FILES)" to
"file_is_valid($_) for @FILES".  Same effect, but with the first one you
can declare the plan in advance.  (OK, bad example because you know how
many elements are in @FILES.  But the concept still applies.) 

Regards,
Jonathan Rockway

Reply via email to