Tim's IT-Blog

Just a blog about IT and IT-Problems…

List the perl modules installed on your box

by admin_import on 18/05/2010

By using ExtUtils::Installed

# if ExtUtils::Installed not installed, please run first: perl -MCPAN -e 'install ExtUtils::Installed'
perl -MExtUtils::Installed -MData::Dumper -e  'my ($inst) = ExtUtils::Installed->new(); print Dumper($inst->modules());'

By using CPAN:

#shows only Packages which needed an update
perl -MCPAN -e 'print CPAN::Shell->r '

Or use following script:

I’m not a hard-core Perl monger, but I recently needed to find out a list of the perl modules (and their version numbers) installed on a box.

I found the following script very useful:

#!/usr/local/bin/perl
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\\n";
}

[Found at: http://benmetcalfe.com/blog/2005/04/list_the_perl_modules_installed_on_your_/]