samuel.manzer1990 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Everyone, I am trying to set up a system for installing modules on a system on which I don't have root. I want to configure Module::Build to install to ~/lib/ using this line in the .modulebuildrc file:
install --install_base /Users/smanzer/
If I run the build.PL manually in the shell, as follows, it works and installs to that directory:
perl Build.PL ./Build ./Build test ./Build install
But if I try using the internal methods to do it, it fails because it tries to install to "/":
my $build = Module::Build->new( module_name => $mod_name, license => 'perl', use_rcfile => 1, ); $build->create_build_script; $build->dispatch('build'); $build->dispatch('test', verbose => 1); $build->dispatch('install');
I would really appreciate it if someone could tell me why dispatch() won't read my configuration file.

Replies are listed 'Best First'.
Re: Module::Build configuration problem
by Anonymous Monk on Nov 10, 2009 at 22:54 UTC
    You should look into using CPAN or CPANPLUS with custom configuration
    s conf makemakerflags s conf buildflags
      Thank you for that advice. I actually have CPAN configured now, but I'd like to use this script for installing current and future versions of the custom modules that some of my colleagues are developing right now, which aren't on CPAN.