如何强制 cpan 使用 HTTPS 而不是使用 HTTP 来安装依赖项

How to force cpanm to use HTTPS insted of Using HTTP for installing dependencies

您好,我正在尝试使用 cpanm.But 安装 perl 模块,我的防火墙不允许 cpanm 使用 http。 即使当我使用 --mirror 选项强制它使用 https 时,它仍然使用 http 来安装依赖项。我如何强制 cpanm 仅使用 https://mirror-address .

Perl Version 5.16.3
Cpanm Version 1.6922

来自the documentation

cpanm --from https://cpan.metacpan.org/ Plack    # use only the HTTPS mirror

如果您使用 Linux 或 Unix,请尝试:

~$ echo "alias cpanm='cpanm --from https://cpan.metacpan.org/'" >> .bashrc
~$ source .bashrc