Tag Archives: proxy

Setting proxy for CPAN

To enable CPAN behind proxy:

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

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

cpan[1]> o conf init /proxy/

If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 <ftp_proxy>
Your ftp_proxy? []

 <http_proxy>
Your http_proxy? [webproxy.yourdomain.com:8080]

 <no_proxy>
Your no_proxy? []

If your proxy is an authenticating proxy, you can store your username
permanently. If you do not want that, just press RETURN. You will then
be asked for your username in every future session.

Your proxy user id? []

Please remember to call 'o conf commit' to make the config permanent!

cpan[2]> o conf commit
commit: wrote '/usr/share/perl5/CPAN/Config.pm'

Ref: http://abhijit.name/setting_cpan_for_proxy.html