Operating System - HP-UX
1753964 Members
7511 Online
108811 Solutions
New Discussion юеВ

How to find the installed perl modules

 
SOLVED
Go to solution
Arun123
Occasional Contributor

How to find the installed perl modules

Hi Team,

How can I find the currently installed perl modules in my hp-ux 11.11i system. I am doing an OS upgrade and need to know which modules are currently installed in my system..?
7 REPLIES 7
Tim Nelson
Honored Contributor
Solution

Re: How to find the installed perl modules

#!/usr/bin/perl

use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}
Kenan Erdey
Honored Contributor

Re: How to find the installed perl modules

hi,

swlist -l fileset | grep -i perl
Computers have lots of memory but no imagination
James R. Ferguson
Acclaimed Contributor

Re: How to find the installed perl modules

Hi:

Tim's suggestion will do what you want. Using the standard SD tools ('swlist' in the case) is meaningless for Perl modules.

Regards!

...JRF...
Arun123
Occasional Contributor

Re: How to find the installed perl modules

Hi Tim/James,

I am not good in perl and it gives following error.

syntax error in file test at line 2, next 2 tokens "use ExtUtils"
Missing $ on loop variable at test line 4.

James R. Ferguson
Acclaimed Contributor

Re: How to find the installed perl modules

Hi Arun:

Did you copy-and-paste exactly what Tim offered?

I suspect you didn't and that the script you are running does *not* begin with the correct interpreter line.

The first line of the file should be:

#!/usr/bin/perl

...or:

#!/usr/bin/env perl

Regards!

...JRF...
Doug O'Leary
Honored Contributor

Re: How to find the installed perl modules

Hey;

A google search on "perl list modules installed" will be very helpful.

There's a freeware utility called list-modules.pl (also google-searchable) which will generate a web page containing all the installed modules.

I hacked it to get rid of all the html crap as I like command line stuff. It's easy enough to do. If you need it, let me know and I can paste it in for you.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Arun123
Occasional Contributor

Re: How to find the installed perl modules

Hi Team,

Thanks for the help. That resolve my issue.