SolengTech‎ > ‎Open Source‎ > ‎

HowTo: Update CPAN

I've needed CPAN to get perl packages for Webmin, and other utilities that I use. CPAN has become a mixture of upgrades as standard pakages in Fedora/CentOS/Ubuntu, as well as the standard CPAN channels. The configuration of the default setup is not so efficient, and update can take an hour. The default configuration does requires several prompts on updates, and doesn't save this information so each time it must be re-entered. Third, the default doesn't allow other package like webmin to add packages from their web interface.

This comes from several hours setting up and upgrading CPAN, the result is something fast and easy to update.

# CPAN consists of packates within CPAN and within the yum and apt-get OS repositories.
yum list *cpan*
apt-cache search cpan

# Many of the standard packages are here.
yum install cpanspec

# Fast update, notest, considered risky by some, but not all:)
perl -MCPAN -e 'CPAN::Shell->notest(install => CPAN::Shell->r)'

# Getting CPAN to where you can update it...

# Some I've always had to go and get.
yum install perl-YAML ncftp lynx

# notest command not available in Centos55 cpan, first
# Inside CPAN,
  install LWP
  install Bundle::CPAN
  reload cpan
  o conf init

# From CentOS, you will probably need to upgrade Perl. Forcing one of the
# packages initiates a build. To take about 20 defaults,
# use the & -d option from the command line when the
# perl build starts.

  force install warnings
  & -d