Buddy Burden wrote:
Not criticizing, not claiming my method is better, just looking for
any reasons why this wouldn't work. And, JIC there's some agreement
that it _would_ work, I've already put together a patch for Test::Most
that does it. That is, at the top of your script, you put this:
use Test::Most 'defer_plan';
and at the bottom of your script, you put this:
all_done();
and it just DTRT. The implementation is perhaps not as clean as I'd
like it to be, but it's not a horrific hack either. I'm going to
forward it to Ovid through normal CPAN channels.
Thoughts?
This method is fine and has been suggested several times before.
http://rt.cpan.org/Public/Bug/Display.html?id=20959
I've just been dragging my feet on it. I finally had occasion to make use of
it when I had to hand roll a C TAP library (libtap tried to be nice about
threads and wound up losing). I hate writing plans, and C makes everything 3x
more annoying, so I wrote a done_testing() function and just didn't bother
requiring a plan at all. It was all very convenient.
So maybe I'll get around to implementing it.
--
Insulting our readers is part of our business model.
http://somethingpositive.net/sp07122005.shtml