perlperlbrewcpanm

perlbrew perl cpanm faulty


I installed a module under cpanm, apparently incorrectly. It is visible and usable when running under system perl, but not under perlbrew. However, perlbrews cpanm is stating that module has been successfully installed. Best steps to take?

/Users/john/perl5/perlbrew/perls/perl-5.18.2/bin/perl
/Users/john/perl5/bin/cpanm
#!/usr/bin/perl
MM: INSTALL_BASE=/Users/john/perl5
MB: --install_base "/Users/john/perl5"

Note: .pl file contains following
#!/usr/bin/env perl

After perlbrew switch...

declare -x PERL5LIB="/Users/john/perl5/lib/perl5"
declare -x PERLBREW_BASHRC_VERSION="0.76"
declare -x PERLBREW_HOME="/Users/john/.perlbrew"
declare -x PERLBREW_MANPATH="/Users/john/perl5/perlbrew/perls/perl-5.18.2/man"
declare -x PERLBREW_PATH="/Users/john/perl5/perlbrew/bin:/Users/john/perl5/perlbrew/perls/perl-5.18.2/bin"
declare -x PERLBREW_PERL="perl-5.18.2"
declare -x PERLBREW_ROOT="/Users/john/perl5/perlbrew"
declare -x PERLBREW_VERSION="0.76"
declare -x PERL_LOCAL_LIB_ROOT="/Users/john/perl5"
declare -x PERL_MB_OPT="--install_base \"/Users/john/perl5\""
declare -x PERL_MM_OPT="INSTALL_BASE=/Users/john/perl5"

Link to sybase install with hombrew


Solution

  • cpanm doesn't install any modules. It just runs the installer packaged with the distributions you want to install. Via the PERL_MM_OPT and PERL_MB_OPT env vars, you are instructing those installers to install the modules in the wrong location. Get rid of them.