Tyler MacDonald wrote: > Michael Peters <[EMAIL PROTECTED]> wrote: >>> use Test::More tests => 'defer'; >>> >>> and then >>> >>> plan past_tests => $n; >> What benefit would that give? plan() is nice because it provides protection >> against you test script exiting prematurely. > > <stating the obvious> > The exact same benefit as doing a 'plan' at the > beginning, except this would work for scripts that don't know how many tests > they are going to run in advance.
<stating-the even-obviouser> If your script exists prematurely then your deferred plan will not be called, hence, no protection. </stating-the-even-obviouser> > If the calculated result used in the > 'plan' at the end does not match the number of tests actually run, then you > know you've got a problem with your test code. > </stating the obvious> So this gives you protection against not being able to count? -- Michael Peters Developer Plus Three, LP