Ovid wrote: > In relation to this bug: > > http://use.perl.org/~Ovid/journal/33441
I was not aware that http://use.perl.org/~Ovid/journal/ is the Test::More bug tracker now. :P Report early, report often. > I had use_ok('Some::Module', @import_list) appear to succeed, even though it > had not. The imports weren't imported and that's because I had a previous > failure with: > > eval 'use Some::Module'; > ok $@ ... > > That put 'Some/Module.pm' in the %INC hash, preventing it from being reloaded > with use_ok(). > > In this case, I think either use_ok() should fail (which might break some > test suites since its behavior has changed), or that it should issue a > warning if $module is found in %INC. > > Does this sound reasonable? On the one hand, use_ok() does that it says on the tin. Its emulating a use. I'm not inclined to change the behavior of use_ok() to be different from use, I'm quite happy its done its job so well. OTOH the trap you pointed about above is a real problem. One way out of this might be to absorb Audrey's clever ok.pm. http://rt.cpan.org/Public/Bug/Display.html?id=24177 This at least allows the basic load tests to happen at compile before before any evals.