Re: Listing all of the perl modules installed
by toolic (Bishop) on Oct 28, 2010 at 23:36 UTC
|
findpm
| [reply] [d/l] [select] |
Re: Listing all of the perl modules installed
by Tux (Canon) on Oct 29, 2010 at 06:14 UTC
|
I bet searching here on monks would have given you a few examples of how monks do this. There is a plethora of scripts available by now as there are many ways to answer the question.
I also wrote a script myself, but with a few additions to make it easier to find module not (yet) installed, so that I don't have to dig on CPAN when I'm looking for a module that does XML/XPM/CSV/mysql/...
Note that my script works based on the list of modules available as seen by CPAN, so it will not find modules that were manually copied into the perl tree.
$ modlist -?
usage: modlist [ -a AUT ] [ -r ] [ -i ] [ -nc ] [ <pattern> ]
-a | --author=AUTHOR_ID Only modules from author
-r | --registered Only registered modules
-i | --installed Only installed modules
-n | --new Only new modules
-c | --csv Output module and version as CSV
<pattern> Only modules that match pattern
$ modlist -i xpm
Module name Description
+ Version
Bundle::Image::Info::XPM
+ 0.01
Image::Info::XPM
+ 1.07
Image::Xpm
+ 1.12
Tk::XPMs
+ 1.11
$ modlist -r peek
Module name Description
+ Version
Apache::Peek Devel::Peek for mod_perl
Data::Peek A collection of low-level debug facilities
+ 0.31
Devel::Peek Peek at internal representation of Perl data
+ 1.04
Core since 5.006 1.00_01 in 5.010001
+ 1.04
POE::API::Peek Peek into the internals of a running POE env
$
It also does colorizing (when available), shows if it is a CORE module (using Module::Corelist), since when and what version in core,
Enjoy, Have FUN! H.Merijn
| [reply] [d/l] |
|
Yeah, I did the search as suggested, and found it lacking. All I want is a way to use Module::Corelist to list the modules that are installed with perl on my box. Pretty simple, I'd say, but nothing I've found here on this site, seems to just do that. I read the doc from CPAN on Module::Corelist, and came up empty there also. Is this really that tough of a request? Just a simple script that uses Module::Corelist to list the installed modules. That's it.
| [reply] |
|
Revised comment: Thank you, I did finally find one. Not simple by any means, but I did find one.
| [reply] |
Re: Listing all of the perl modules installed
by bingos (Vicar) on Oct 28, 2010 at 21:21 UTC
|
I have a script that finds and lists all the installed modules on a system
A slight variation on that theme for listing all the distributions that are installed
| [reply] |
Re: Listing all of the perl modules installed
by kejohm (Hermit) on Oct 29, 2010 at 03:09 UTC
|
#!perl
use strict;
use warnings;
use feature qw(:5.12);
use ExtUtils::Installed;
use Module::CoreList;
use Module::Info;
my $inst = ExtUtils::Installed->new();
my $count = 0;
my %modules;
foreach ( $inst->modules() ) {
next if m/^[[:lower:]]/; # skip pragmas
next if $_ eq 'Perl'; # core modules aren't present in this
+list,
# instead coming under the name Perl
my $version = $inst->version($_);
$version = $version->stringify if ref $version; # version may be r
+eturned as
# a version object
$modules{$_} = { name => $_, version => $version };
$count++;
}
foreach ( Module::CoreList->find_modules() ) {
next if m/^[[:lower:]]/; # skip pragmas
my $module = Module::Info->new_from_module($_) or next;
$modules{$_} = { name => $_, version => $module->version // q(???)
+ };
$count++;
}
foreach ( sort keys %modules ) {
say "$_ v$modules{$_}{version}";
}
say "\nModules: $count";
__END__
Update: Links fixed. | [reply] [d/l] |
Re: Listing all of the perl modules installed
by Khen1950fx (Canon) on Oct 28, 2010 at 22:34 UTC
|
Here's an easy way:
pminst - shows all installed modules
pminst -l - shows all installed modules with full path
To match a particular text string, I'll use 'sample':
pminst '(?i)sample'
| [reply] [d/l] [select] |
|
unfortunately, pminst is part of pmtools, which isn't part of the core. And wouldn't work anyway where I work.
| [reply] |
Re: Listing all of the perl modules installed (autobundle)
by Anonymous Monk on Feb 01, 2013 at 14:39 UTC
|
| [reply] [d/l] [select] |
|
| [reply] |
Re: Listing all of the perl modules installed
by PerlPundit (Initiate) on Aug 25, 2015 at 10:44 UTC
|
The following command can be helpful in finding the installed perl modules :
instmodsh
It will give some options - Press l and enter
This will list down all the installed modules.
Hope it Helps!!!!!!!!!!!!!!!
:-) | [reply] |
|
| [reply] |
|
Thanks for the info Anon:
I haven't tried it on debian yet.
What about lsmod ?- I think this can be used in debian.
| [reply] |
|
|
|
Yup, that did exactly what I needed. Thanks
| [reply] |
Re: Listing all of the perl modules installed
by Anonymous Monk on Feb 01, 2013 at 03:20 UTC
|
To see all the modules you've installed using something like cpanm, do: perldoc perllocal
To see a list of system packages on a Debian-based system (that is, ones installed via apt), do:
dpkg -l | grep 'lib.*\?-perl'
| [reply] [d/l] |
|
corelist -v 5.16.2
| [reply] |