I want a list of installed Perl modules on my system. From perlfaq3, I tried the following code:
#!/usr/bin/perl -w
use strict;
use ExtUtils::Installed;
my ($inst) = ExtUtils::Installed->new();
my (@modules) = $inst->modules();
foreach my $mod (@modules) {
print "$_\n";
}
which results in the useless output
.packlist
.packlist
.packlist
...
.packlist
.packlist
.packlist
I checked out the ExtUtils::Installed manpage and the program seems consistent with the recommended usage.The modules list is supposed to be generated from the set of .packlist, so there is a parsing step missing. What am I (and possibly the faq) doing wrong? This is a perl 5.8.0, Mandrake 9.1 system.