Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
use_ok() can report a false-positive #149
Recently, I got a false-positive from use_ok() on a module that had been deleted from my distro, but was still being tested for in a test-suite. The reason I got this, is that because I had a previous version of the distro installed, the deprecated module lived under a site_perl somewhere. However, clean tests of my release by people such as CPAN Testers and the Debian team got test failures.
It might be worthwhile to consider having use_ok look at %INC after a successful "use" of the module, and see if it picked it up from lib/blib, or from a system location. Whether this case would warrant a failing test is questionable, but it should at least garner a warning.
The use case you propose has merit, and you're free to write a version of
I'm going to close it up, but feel free to keep discussing.