From command line:
cpan -l
From a Perl script:
use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @modules = $inst->modules();