what perl modules are installed

Peter Hickman peter.hickman at semantico.com
Wed Feb 13 14:10:07 GMT 2008

Ian Docherty wrote:
> I am sure other people have had this requirement.
> How do I find out what perl modules are installed on a system and what 
> version?
> I have started at a company that has several servers, supposedly all 
> servers have the same
> modules installed but in practice modules have been installed by a 
> variety of means, directly
> from cpan, by manual installation, by copying files from other 
> servers. I need to be able to
> get a list of what is installed on each system.
> I have found reference to a file perllocal.pod which is supposed to 
> contain the list of perl
> modules and their date, but no version and I suspect it is only used 
> when doing a 'make'.
> Is there a quick way of doing this rather than traversing the @INC 
> directories and reading
> every file?
> Regards
> Ian C. Docherty (icydee)
Something like this:


use strict;
use warnings;

use ExtUtils::Installed;

my $inst = new ExtUtils::Installed;
foreach my $module ( sort $inst->modules() ) {
    my $version = $inst->version($module) || '**unknown**';

    print "$module version $version\n";

Which in all probability I found posted here in the first place.

Peter Hickman.

Semantico, Lees House, 21-23 Dyke Road, Brighton BN1 3FE
t: 01273 358223
f: 01273 723232
e: peter.hickman at semantico.com
w: www.semantico.com

More information about the london.pm mailing list