Forcing Perl to install CPAN packages via HTTP (i.e. avoiding FTP)

If you are behind a firewall and your FTP connectivity with the external world is just restricted you might get frustrated with Perl’s automatic way of installing packages (via CPAN) because it uses FTP protocol by default.

Solution

Edit your CPAN settings file (probably /etc/perl/CPAN/Config.pm) and change the line:

'urllist' => [],

it should look like this:

'urllist' => [q[http://www.perl.com/CPAN]],

After that you should be able to install automatically CPAN modules using http protocol instead of ftp.

See Also


Posted

in

, ,

by