我在cpanm下安装了一个模块,显然是错误的。在系统perl下运行,但在perlbrew下运行时,它可见且可用。但是,perlbrews cpanm表示该模块已成功安装。最好的步骤?
/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
撬杠切换后...
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
最佳答案
cpanm
不安装任何模块。它仅运行与要安装的发行版打包在一起的安装程序。通过PERL_MM_OPT
和PERL_MB_OPT
env vars,您指示这些安装程序将模块安装在错误的位置。摆脱它们。