How to tell what modules are installed?

J

Jim Anderson

Our SysAdmins have created a Solaris package of perl5.8.0 and
installed a number
of packages from CPAN. What's the best way to get a list of all the
installed modules?

Thanks,

jim
 
H

Helgi Briem

Unfortunately, this just tells me that there's no doc for 'installed'.

Then you either do not have Perl installed on your system
or the installation is broken. Which is it?
 
A

Andreas Kahari

Then you either do not have Perl installed on your system
or the installation is broken. Which is it?

Hmmm...

$ perl -v

This is perl, v5.8.0 built for i386-openbsd
[...]

$ perldoc -q installed
No documentation for perl FAQ keyword `installed' found
 
A

Anno Siegel

Jim Anderson said:
Unfortunately, this just tells me that there's no doc for 'installed'.

Ah... you're running an older Perl. The FAQ suggests to use the
ExtUtils::Installed module. Another possibility is "perldoc perllocal".
That lists all modules that were properly installed through CPAN.

If you just want to know if module Xyz is installed, try "perldoc Xyz".
If you can read the documentation, the module is (most likely) installed,
if you can't it (most likely) isn't, though it can conceivably go
wrong either way.

Anno
 
H

Helgi Briem

Then you either do not have Perl installed on your system
or the installation is broken. Which is it?

Hmmm...

$ perl -v

This is perl, v5.8.0 built for i386-openbsd
[...]
$ perldoc -q installed
No documentation for perl FAQ keyword `installed' found

So it's broken. You should look into that.

It seems to be endemic, because the section in question,
"How do I find which modules are installed on my system?"
should be in perlfaq3 and is there on most of my systems,
but not on yours, not on my Linux ES 2.1 with perl 5.6.1 nor on
http://perldoc.com/perl5.8.0/pod/perlfaq3.html
where it should be.

Hmmm, indeed.

Short answer:
#!perl
use warnings;
use strict;
use ExtUtils::Installed;
my $inst = ExtUtils::Installed->new();
my @modules = $inst->modules();
print join "\n",@modules;
__END__
 
C

Chris Mattern

Anno said:
Ah... you're running an older Perl. The FAQ suggests to use the
ExtUtils::Installed module. Another possibility is "perldoc perllocal".
That lists all modules that were properly installed through CPAN.

My perl is 5.8.0, installed just a few months ago. perldocs cannot
find any FAQ with the keyword "installed". It's beginning to look
like this FAQ was recently *removed* for some reason.

Chris Mattern
 
S

Steve Grazzini

Bernard El-Hagin said:
It's neither. There *is* no result for 'perldoc -q installed' except for
the "No documentation ... found" error.

That FAQ is new in 5.8.1 (just another possible explanation).
 
M

Malcolm Dew-Jones

Chris Mattern ([email protected]) wrote:
: Anno Siegel wrote:
: >
: >>: >>
: >>>Jim Anderson wrote:
: >>>
: >>>>What's the best way to get a list of all the installed modules?
: >>>
: >>>That's a FAQ.
: >>>
: >>> perldoc -q installed
: >>
: >>Unfortunately, this just tells me that there's no doc for 'installed'.
: >
: >
: > Ah... you're running an older Perl. The FAQ suggests to use the
: > ExtUtils::Installed module. Another possibility is "perldoc perllocal".
: > That lists all modules that were properly installed through CPAN.

: My perl is 5.8.0, installed just a few months ago. perldocs cannot
: find any FAQ with the keyword "installed". It's beginning to look
: like this FAQ was recently *removed* for some reason.

perldoc -q installed

It isn't in perl 5.005 or perl 5.6.1 either, on several systems I just
checked.

(An admittedly small number of) Google postings from the past show various
answers but make no reference to any faq entry to answer the question.

This has certainly been a "Frequently Asked Question", but it doesn't look
like it was a "Fully Answered Question" until very recently.

And for any number of production systems that require enhanced stability
over enhanced but-for-them-unused-features, this will continue to be a
"Frequently Annoying Quandry".
 
T

Tintin

Steve Grazzini said:
That FAQ is new in 5.8.1 (just another possible explanation).

$ perldoc -v
This is perl, v5.8.0 built for MSWin32-x86-multi-thread

$ perldoc -q installed
Found in C:\indigoperl\perl\lib\pod\perlfaq3.pod
How do I find which modules are installed on my system?

$ perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi

$ perldoc -q installed
Found in /usr/lib/perl5/5.8.0/pod/perlfaq3.pod
How do I find which modules are installed on my system?
 
M

MPBroida

Helgi said:
$ perl -v

This is perl, v5.8.0 built for i386-openbsd
[...]
$ perldoc -q installed
No documentation for perl FAQ keyword `installed' found

So it's broken. You should look into that.

It seems to be endemic, because the section in question,
"How do I find which modules are installed on my system?"
should be in perlfaq3 and is there on most of my systems,
but not on yours, not on my Linux ES 2.1 with perl 5.6.1 nor on
http://perldoc.com/perl5.8.0/pod/perlfaq3.html
where it should be.

Hmmm, indeed.

In our installation:
(This is perl, v5.6.0 built for MSWin32-x86-multi-thread ...)

that question is not in ANY of the FAQ3 files:
perlfaq3.html
perlfaq3.pod
ActivePerl-faq3.html
(or in any other FAQ files).

There are several ActivePerl-WinfaqX.html files, but the one
named "ActivePerl-Winfaq3.html" is not there.
Maybe that's where it belongs, but it's missing?

Mike
 
S

Steve Grazzini

Tintin said:
$ perldoc -v
This is perl, v5.8.0 built for MSWin32-x86-multi-thread

$ perldoc -q installed
Found in C:\indigoperl\perl\lib\pod\perlfaq3.pod
How do I find which modules are installed on my system?

$ perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi

$ perldoc -q installed
Found in /usr/lib/perl5/5.8.0/pod/perlfaq3.pod
How do I find which modules are installed on my system?

Well... it went in a couple of months after 5.8.0 (change 18185).
I know RedHat was distributing a patched version of 5.8.0; maybe
Indigo does the same thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,365
Latest member
BurtonMeec

Latest Threads

Top