cpan 配置错误-如何更改?

cpan 配置错误-如何更改?

我似乎错误地配置了垃圾邮件,现在正试图更改它。我在其他地方读到删除 /root/.cpam 的方法,我照做了,但这并没有帮助我获得启动对话框。

当我在控制台中输入 o config 时,我得到了:

perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> o conf
CPAN::Config options from /usr/lib/perl5/5.8.8/CPAN/Config.pm:
commit             Commit changes to disk
defaults           Reload defaults from disk
init               Interactive setting of all options

build_cache        10
build_dir          /home/andy/sw/bugzilla-4.0.1/install DateTime/build
cache_metadata     1
cpan_home          /home/andy/sw/bugzilla-4.0.1/install DateTime
dontload_hash
ftp                /usr/bin/ftp
ftp_proxy
getcwd             cwd
gpg                /usr/bin/gpg
gzip               /usr/bin/gzip
histfile           /home/andy/sw/bugzilla-4.0.1/install DateTime/histfile
histsize           100
http_proxy
inactivity_timeout 0
index_expire       1
inhibit_startup_message 0
keep_source_where  /home/andy/sw/bugzilla-4.0.1/install DateTime/sources
lynx
make               /usr/bin/make
make_arg
make_install_arg
makepl_arg
ncftpget           /usr/bin/ncftpget
no_proxy
pager              less
prerequisites_policy ask
scan_cache         atstart
shell              /bin/bash
tar                /bin/tar
term_is_latin      1
unzip              /usr/bin/unzip
urllist
    ftp://ftp.fu-berlin.de/unix/languages/perl/
wget               /usr/bin/wget


cpan>

显然,当我尝试安装 DateTime 模块时我做错了什么。

我该如何修复?我使用的是 suse 10.3

答案1

摘录自人CPAN如下:

o conf init稍后,可以通过在 CPAN shell 中发出命令来再次启动配置对话框。可以通过发出命令来运行配置对话框的子集o conf init WORD,其中 WORD 是任何有效的配置变量或正则表达式。

答案2

CPAN.pm 配置保存在~/.cpan/CPAN/MyConfig.pm您就可以编辑该文件。

如果您想通过 shell 更改 CPAN.pm 配置。运行cpan不带参数的命令以进入 shell。从那里,o conf将显示所有选项。o conf OPTION将显示某些内容的当前值,并o conf OPTION VALUE设置新值。完成后,使用o conf commit保存更改。请参阅CPAN::首次了解选项的详细信息。

$ cpan
Terminal does not support AddHistory.

To fix that, maybe try>  install Term::ReadLine::Perl


cpan shell -- CPAN exploration and modules installation (v2.33)
Enter 'h' for help.

cpan[1]> o conf
$CPAN::Config options from /Users/brian/.cpan/CPAN/MyConfig.pm:
    commit             [Commit changes to disk]
    defaults           [Reload defaults from disk]
    help               [Short help about 'o conf' usage]
    init               [Interactive setting of all options]

    ...
    use_sqlite         [0]
    username           undef
    version_timeout    [15]
    wait_list          undef
    wget               []
    yaml_load_code     [0]
    yaml_module        [YAML]


cpan[2]> o conf use_sqlite
    use_sqlite         [0]

cpan[3]> o conf use_sqlite 1
    use_sqlite         [1]
Please use 'o conf commit' to make the config permanent!


cpan[4]> o conf commit
commit: wrote '/Users/brian/.cpan/CPAN/MyConfig.pm'

相关内容