Perl – How to update all the CPAN modules to their latest versions cpanperl How do I update all my CPAN modules to their latest versions? Best Answer An alternative method to using upgrade from the default CPAN shell is to use cpanminus and cpan-outdated. These are so easy and nimble to use that I hardly ever go back to CPAN shell. To upgrade all of your modules in one go, the command is: cpan-outdated -p | cpanm I recommend you install cpanminus like the docs describe: curl -L https://cpanmin.us | perl - App::cpanminus And then install cpan-outdated along with all other CPAN modules using cpanm: cpanm App::cpanoutdated BTW: If you are using perlbrew then you will need to repeat this for every Perl you have installed under it. You can find out more about cpanminus and cpan-outdated at the Github repos here: https://github.com/miyagawa/cpanminus https://github.com/tokuhirom/cpan-outdated Related SolutionsPerl – How to get a list of installed CPAN modules This is answered in the Perl FAQ, the answer which can be quickly found with perldoc -q installed. In short, it comes down to using ExtUtils::Installed or using File::Find, variants of both of which have been covered previously in this thread. You can also find the FAQ entry "How do I find which modules are installed on my system?" in perlfaq3. You can see a list of all FAQ answers by looking in perlfaq Perl – How to tell CPAN to install all dependencies Try setting PERL_MM_USE_DEFAULT like so: PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install My::Module' It should make CPAN answer the default to all prompts. Related TopicPerl – How to use CPAN as a non-root userPerl – How to automate CPAN configurationPerl – How to upgrade perl modules that install from CPAN
Best Answer
An alternative method to using
upgrade
from the default CPAN shell is to usecpanminus
andcpan-outdated
.These are so easy and nimble to use that I hardly ever go back to CPAN shell. To upgrade all of your modules in one go, the command is:
I recommend you install
cpanminus
like the docs describe:And then install
cpan-outdated
along with all other CPAN modules usingcpanm
:BTW: If you are using
perlbrew
then you will need to repeat this for every Perl you have installed under it.You can find out more about
cpanminus
andcpan-outdated
at the Github repos here: