----- Original Message ---- > From: Michael G Schwern <schw...@pobox.com>
First of all, thank you! This is fantastic work and I'm sure it will make a lot of people happy. > Finally, this makes it now possible to build up the test plan as you go. I'd > like to put first order support into Test::Builder and Test::More for it, but > for the moment this will work: > > use Test::More; > > my $tests = 2; > pass; > pass; > > $tests += 1; > pass; > > done_testing($tests); Thoughts on first order support: use Test::More; plan(3); pass; pass; pass; plan(2) pass; pass; done_testing() # optional Then, you can incrementally build a plan for those who want it and it seems backwards almost compatible (since done_testing() wouldn't be required). The problem is that internally, TB will see that plan() has been called and will die if a plan has been called twice. Alternatively: use Test::More; plan(3); pass; pass; pass; add_plan(2) pass; pass; done_testing() # NOT optional Or: use Test::More 'deferred'; plan(3); pass; pass; pass; plan(2) pass; pass; done_testing() # NOT optional Thoughts? (The first idea is bugging me because I swear I had thought of a show-stopper over lunch, but for the life of me, I can't recall what it was). Cheers, Ovid