Monday, May 11, 2009

Testing with Module::Build

Module::Build is a system for building, testing, and installing Perl modules.

Much of what you need to know is documented in the POD of Module::Build. In particular see the entry for the test function.

You may wonder how the as-yet-uninstalled module is tested when the test files do not explicity reference the build directories. This isn't covered in the POD.

Before running the tests, Module::Build prepends the blib/lib and blib/arch directories of the build directory to @INC. In this way, when modules are loaded the local copies are found and loaded rather than those already installed.

No comments:

Labels