cpan 程序的配置文件位于 ~/.cpan/CPAN/MyConfig.pm
. 配置其代理需要求该其配置文件.
cpanm 似乎是直接读取环境变量。
cpanm 设置安装位置以及代理
先用将需要的环境变量利用 local::lib
模块导入 ~/.zshrc
或其他环境文件中:
1
| $ perl -Mlocal::lib >> ~/.zshrc
|
之后修改变量值即可:j
1 2 3 4 5 6 7 8 9 10
| export http_proxy="http://10.0.8.4:3128" export https_proxy="http://10.0.8.4:3128"
export PATH="/home/jie/Disk/Language/perl5/bin${PATH:+:${PATH}}" export PERL5LIB="/home/jie/Disk/Language/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}" export PERL_LOCAL_LIB_ROOT="/home/jie/Disk/Language/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}" export PERL_MB_OPT="--install_base \"/home/jie/Disk/Language/perl5\"" export PERL_MM_OPT="INSTALL_BASE=/home/jie/Disk/Language/perl5"
|