From: Christopher H. Laco <[EMAIL PROTECTED]>
> I'm thinking about doing the same thing. Before Chris Dolan wrote a
> Testing::RequireTestLabels policy for me (thanks!), I was going to
> subclass Test::More and expose the usual methods and tack on my argument
> checking.
Just threw this together and it seems to do the trick.
package My::Test::More;
use Test::Builder::Module;
@ISA = qw(Test::Builder::Module);
use Test::More;
@EXPORT = @Test::More::EXPORT;
# add whatever you need here:
$ENV{WE_BE_TESTING} = 1;
1;
And in your regular code, use it like normal:
use My::Test::More tests => 23;
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/