ArchiveOld post. Originally published 2 March 2011 on the WordPress version of this site. Preserved here for the search engines and the curious. Old me had opinions.
Developer2 min read

Update all CPAN Modules

I’ve inherited a nasty PERL based web tool for managing IP addresses and realised that I don’t actually know much about PERL. Being faced with over 300 PERL modules that needed to be updated I went looking for some help and found this helpful article here.

Here’s an easy one-liner which will automatically update all of the CPAN modules installed on your machine:

$ sudo perl -MCPAN -e 'CPAN::Shell->notest(install => CPAN::Shell->r)'

I always do it with sudo but you might not have to depending on your preferences.

Since waiting around for all of the tests to complete can be quite dull, I use notest() which might be considered risky by others.


Filed under Developer. No comments, on purpose.