1. 查看全部配置
cpan[1]> o conf
commit [Commit changes to disk]
defaults [Reload defaults from disk]
help [Short help about 'o conf' usage]
init [Interactive setting of all options]
...
commandnumber_in_prompt [1]
commands_quote undef
connect_to_internet_ok [1]
cpan_home [~/.cpan]
curl [/anaconda3/bin/curl]
dontload_hash undef
dontload_list undef
lynx [/usr/bin/lynx]
make [/anaconda3/envs/R-3.6.1/bin/make]
make_arg []
make_install_arg []
make_install_make_command [/anaconda3/envs/R-3.6.1/bin/make]
makepl_arg [INSTALLDIRS=site]
...
trust_test_report_history [0]
unzip [/usr/bin/unzip]
urllist
use_sqlite [0]
2. 查看指定配置
如,查看 make
的路径
cpan[2]> o conf make
查看源
cpan[3]> o conf urllist
3. 修改指定配置
cpan[4]> o conf make new_make_path
4. 增加源
添加一个
cpan[5]> o conf urllist push http://mirrors.aliyun.com/CPAN/
一次增加多个源
cpan[6]> o conf urllist ftp://mirrors.sohu.com/CPAN/ http://mirrors.163.com/cpan/
5. 删除源
移除一个源
cpan[7]> o conf urllist pop http://mirrors.163.com/cpan/ ftp://mirrors.sohu.com/CPAN/
6. 提交修改
cpan[8]> o conf commit
7. 重新初始化
如果对当前的 cpan
配置不满意,可以重新初始化配置
cpan[9]> o conf init
网友评论