Fix for Perl CPAN download problem on RHEL5

CPAN (Comprehensive Perl Archive Network) is a very nice way to manage your Perl modules. You can easily install a new Perl module:

    perl -MCPAN -e 'install Net::Twitter::Lite'

On my machines running Perl 5.8.8, the Net::FTP as well as the LWP methods failed to download files from the CPAN mirrors.

Fix: open /usr/lib/perl5/5.8.8/CPAN/Config.pm in your favorite text editor and change the dontload_hash value to read as follows:

    'dontload_hash' => { "Net::FTP" => 1, "LWP" => 1 },

This disables the Net::FTP and LWP methods, reverting to wget.

Next, have the CPAN module update itself.

    perl -MCPAN -e 'shell'
    cpan> install Bundle::CPAN
    cpan> reload cpan

Enjoy!

Edit: fixed code formatting.