Forum Moderators: coopster & phranque

Message Too Old, No Replies

How can I get a list of installed perl modules?

         

runner

8:17 pm on Jun 1, 2005 (gmt 0)

10+ Year Member



How can I get a complete listing of perl modules that are installed on my host? I did a google search and found some utilities that do this for you but they require a web server. The host I am on does not have a web server. There are also multiple versions of perl on this host and I need to generate and compare the perl moduled from the various perl versions.

Thanks for any info...

wruppert

9:47 pm on Jun 1, 2005 (gmt 0)

10+ Year Member



What kind of system are you on?

perl -e'print join "\n", @INC' on a unix type box will give you a list of where perl is looking for modules. You could then list the contents of those directories.

I have no idea how to deal with the versioning issue. Presumbably, each version somehow has its own @INC...

Also, take a second look at those utilities - if they are simply CGI perl programs, you could run them from the command line and capture stdout to a file.

runner

2:26 pm on Jun 2, 2005 (gmt 0)

10+ Year Member



I'm on Solaris. I found a short perl script that did the job. I'd post it but I think it might violate the terms of use.

lexipixel

12:59 am on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I just searched Google for perl script list modules

I found one called list-modules.pl (from webnet77)

Downloaded it, put it on the server, chmod'ed it, ran it... done.

Took me under 5 minutes including reading your post.

SeanW

1:43 pm on Jun 5, 2005 (gmt 0)

10+ Year Member



From the command line, as root:

perl -MCPAN -e 'print CPAN::Shell->r '

Gives you something like


Package namespace installed latest in CPAN file
Apache::Connection 0.01 1.00 G/GO/GOZER/mod_perl-1.29.tar.gz
Apache::Filter 0.01 1.022 K/KW/KWILLIAMS/Apache-Filter-1.022.tar.gz
Apache::Module 0.01 0.11 D/DO/DOUGM/Apache-Module-0.11.tar.gz
...

gnotellaluvr

12:06 am on Jun 7, 2005 (gmt 0)

10+ Year Member



Or if your host provides you with Cpanel, then it is listed in there as well.