(wil) Re: Find Perl Modules Installed.
by wil (Priest) on Jul 01, 2002 at 13:44 UTC
|
This question has been asked and answered many times and is now available in many FAQ documents.
Here is the FAQ answer you're looking for. You might also be interested in finding out which version of a paticular module you have installed.
Hope this helps
- wil | [reply] |
Re: Find Perl Modules Installed.
by dree (Monsignor) on Jul 01, 2002 at 15:00 UTC
|
One way is to use ExtUtils::Installed
use ExtUtils::Installed;
my $inst = ExtUtils::Installed->new();
print join "\n", $inst->modules();
for more informations: ExtUtils::Installed
There is also a free CGI script from Scriptsolutions that shows you all the installed modules and other useful informations.
The script (perldiver) is located here
| [reply] [d/l] |
Re: Find Perl Modules Installed.
by broquaint (Abbot) on Jul 01, 2002 at 13:45 UTC
|
If you type in 'perl modules installed' into the search box at the top of the page you will find a plethora of nodes on this very subject.
HTH
_________ broquaint | [reply] |
•Re: Find Perl Modules Installed.
by merlyn (Sage) on Jul 01, 2002 at 13:43 UTC
|
| [reply] |
Re: Find Perl Modules Installed.
by mikeirw (Pilgrim) on Jul 01, 2002 at 14:06 UTC
|
Something that's been useful to me in the past is the pmtools suite from Tom Christiansen. I can't seem to find a working link to them, so I've uploaded the tarball to my server.
http://ampa.pair.com/~mikeirw/pmtools-1.00.tar.gz
The one that you'll want to check out is called 'pminst'.
| [reply] |
|
| [reply] |
|
| [reply] |
Re: Find Perl Modules Installed.
by flounder99 (Friar) on Jul 01, 2002 at 16:25 UTC
|
perl -e 'use UnknownModule'
if you get something like
Can't locate UnknownModule.pm in @INC (@INC contains: blah blah blah
Then it is not installed.
-- flounder | [reply] [d/l] [select] |
|
#!/usr/bin/perl
# list all of the perl modules installed
use File::Find ;
for (@INC) { find(\&modules,$_) ; }
sub modules
{
if (-d && /^[a-z]/) { $File::Find::prune = 1 ; return }
return unless /\.pm$/ ;
my $fullPath = "$File::Find::dir/$_";
$fullPath =~ s!\.pm$!!;
$fullPath =~ s#/(\w+)$#::$1# ;
print "$fullPath \n";
}
--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--
perl -e '$a="3567"; $b=hex($a); printf("%2X\n",$a);'
--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--
| [reply] [d/l] |
Re: Find Perl Modules Installed.
by smitz (Chaplain) on Jul 01, 2002 at 15:06 UTC
|
| [reply] [d/l] |
|
Which would only return a list of the modules you installed using ppm (and it's query *, not just query).
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in.
|