This module enables the use of the bundled modules in the CPANPLUS/inc directory of this package. These modules are bundled to make sure CPANPLUS is able to bootstrap itself. It will do the following things:

After a list of modules has been gathered, the version of each of them is checked to find the one with the highest version, and return that as the module to use.

This enables us to use a recent enough version from our own bundled modules, but also to use a newer module found in your path instead, if it is present. Thus having access to bugfixed versions as they are released.

If for some reason no satisfactory version could be found, a warning will be emitted. See the DEBUG section for more details on how to find out exactly what CPANPLUS::inc is doing.

Since this module does Clever Things to your search path, it might be nice sometimes to figure out what it's doing, if things don't work as expected. You can enable a debug trace by calling the module like this:

use CPANPLUS::inc 'DEBUG';

This will show you what CPANPLUS::inc is doing, which might look something like this:

CPANPLUS::inc: Found match for 'Params::Check' in
'/opt/lib/perl5/site_perl/5.8.3' with version '0.07'
CPANPLUS::inc: Found match for 'Params::Check' in
'/my/private/lib/CPANPLUS/inc' with version '0.21'
CPANPLUS::inc: Best match for 'Params::Check' is found in
'/my/private/lib/CPANPLUS/inc' with version '0.21'

If this happens, although unlikely in most situations and not happening when calling the shell directly, this could mean that a lower (too low) versioned module is loaded, which might cause failures in the application.

Non-directories are right now skipped by CPANPLUS::inc. They could of course lead us to newer versions of a module, but it's too tricky to verify if they would. Therefor they are skipped. In the worst case scenario we'll find the sufficing version bundled with CPANPLUS.