Bugzilla::Install::CPAN - Routines to install Perl modules from CPAN.
use Bugzilla::Install::CPAN; set_cpan_config(); install_module('Module::Name');
This is primarily used by install-module to do the "hard work" of installing CPAN modules.
set_cpan_config
Sets up the configuration of CPAN for this session. Must be called before "install_module". Takes one boolean parameter. If true, "install_module" will install modules globally instead of to the local lib/ directory. On most systems, you have to be root to do that.
install_module
Installs a module from CPAN. Takes two arguments:
$name
- The name of the module, just like you'd pass to the install
command in the CPAN shell.$test
- If true, we run tests on this module before installing, but we still force the install if the tests fail. This is only used when we internally install a newer CPAN module.Note that calling this function prints a lot of information to STDOUT and STDERR.