On Sat, Sep 15, 2007 at 05:06:01AM -0700, Michael G Schwern wrote:
> Test::More 0.71 fixed a subtle bug where a call to use_ok() inside a BEGIN
> block without a plan would be silently ignored.  That is...
> 
>       use Test::More;
> 
>       BEGIN { use_ok('Exporter') }  # for example
> 
>       plan tests => 1;
>       pass();
> 
> would pass when it should have failed.  This commonly takes the form...
> 
>       use Test::More;
> 
>       if( ...something we need isn't there... ) {
>               plan skip_all => "Missing something";
>       }
>       else {
>               plan tests => 2;
>       }
> 
>       BEGIN { use_ok('Some::Module') }
> 
> Even though the use_ok() comes after the plan() in the code, it gets run
> before because of the BEGIN block.  If your code does the above, it won't work
> anymore.
> 
> This has already effected two modules, and one of them is DBI.
> 

Another is Cache::FastMmap.

Steve Peters
[EMAIL PROTECTED]

Reply via email to