list perl modules installed with yum?

Issues related to applications and software problems
Post Reply
mathog
Posts: 258
Joined: 2008/07/09 23:52:06

list perl modules installed with yum?

Post by mathog » 2019/07/10 21:26:07

Here is an oddity. For many years I have been using this script to list installed perl modules:

Code: Select all

#!/usr/bin/perl
#
# This was found in a newsgroup.  It lists 
# installed perl modules.
#
  use ExtUtils::Installed;
  my $instmod = ExtUtils::Installed->new();
  foreach my $module ($instmod->modules()) {
  my $version = $instmod->version($module) || "???";
         print "$module -- $version\n";
  }
However, it does not work on Centos 7 for modules installed with yum. Here is what happens:

Code: Select all

./list_perl_mod.pl
Perl -- 5.16.3
yum -y install perl-MIME-Lite
./list_perl_mod.pl
Perl -- 5.16.3
Why doesn't that work here? Yes, "rpm -qa | grep perl" shows them, but it is peculiar that Perl itself does not want to list them.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: list perl modules installed with yum?

Post by avij » 2019/07/10 21:48:15

As far as I can see, that relies on the presence of .packlist files. Perl modules packaged into rpms do not have those.

Post Reply