Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-12-2004, 06:49 AM
|
#1
|
Member
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862
Rep:
|
How to list all installed Perl modules
How do I list all the Perl modules installed in my machine? I know perl -l 'use Module::Name;print"okay"' will tell me about
a particular module, but I want a complete list, so I can maybe redirect
it's output to a file.
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
08-12-2004, 08:41 AM
|
#2
|
Member
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862
Original Poster
Rep:
|
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
|
|
|
08-25-2004, 11:14 AM
|
#3
|
Member
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929
Rep:
|
I had the same question, and this works wonderfully - thanks for posting your solution!
-Laura
|
|
|
09-01-2009, 02:56 AM
|
#4
|
LQ Newbie
Registered: Sep 2009
Location: India
Posts: 1
Rep:
|
Perl: query about the module installed
Use command to check for Net::Ping module installed:
perl -MNet::Ping -e "print \"Module installed.\\n\";"
here Net is package name and Ping is module name under package Net.
'Module installed.' message will be displayed if Package::Module installed.
You can try
perl -MNet::Ping -e 1
If you get error message immediately then the module not installed!
Last edited by kpramod; 05-27-2010 at 02:55 AM.
Reason: Extra comment
|
|
|
09-03-2009, 04:44 PM
|
#5
|
LQ Newbie
Registered: Sep 2009
Posts: 1
Rep:
|
thanks
I had to register here just so I could say thanks for the command to pull out all installed perl modules.
Very nice indeed. Thank you again!
|
|
|
09-20-2009, 04:20 PM
|
#6
|
LQ Newbie
Registered: Sep 2009
Posts: 6
Rep:
|
Use the following command and type "l" in the prompt to list all installed perl modules.
Thanks.
|
|
3 members found this post helpful.
|
10-05-2009, 07:12 PM
|
#7
|
LQ Newbie
Registered: Sep 2009
Location: Colorado
Distribution: RedHat 5, SuSE 10
Posts: 9
Rep:
|
And another thanks from me. This just addressed a problem in like 30 seconds. All hail LQ (and google)!
|
|
|
01-02-2010, 10:54 PM
|
#8
|
Member
Registered: Dec 2008
Location: Bellevue,WA
Distribution: RHEL 5 , Fedora ,Sabayon,Solaris,Vmware,AWS
Posts: 107
Rep:
|
Quote:
Originally Posted by SharpyWarpy
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
|
Works great , thanks
But I have a question , in WindowsXP (active perl 5.8) command "perldoc perllocal" works , but in linux it doesnt , any reason for this.
One more way to find is,
$ instmodsh
cmd? l
Available commands are:
l - List all installed modules
m <module> - Select a module
q - Quit the program
cmd? l
Installed modules are:
Image::Magick
OBEXFTP
Perl
SWF
cmd? m perl
Available commands are:
f [all|prog|doc] - List installed files of a given type
d [all|prog|doc] - List the directories used by a module
v - Validate the .packlist - check for missing files
t <tarfile> - Create a tar archive of the module
h - Display module help
q - Quit the module
perl cmd? f
Outputs all the installed modules
Last edited by ++nick++; 01-02-2010 at 10:59 PM.
|
|
|
12-12-2011, 05:48 AM
|
#9
|
Member
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542
Rep:
|
For reference you can use this as well:
Which give this output:
Code:
Crypt::Blowfish (2.12) - Perl Blowfish encryption module
Crypt::DES (2.05) - Perl DES encryption module
Math::PariInit - load C<Math::Pari> with specified $primelimit and $initmem.
Math::Pari (2.01080605) - Perl interface to PARI.
Time::HiRes (1.9721) - High resolution alarm, sleep, gettimeofday, interval timers
Digest::SHA1 (2.13) - Perl interface to the SHA-1 algorithm
Digest::MD2 (2.03) - Perl interface to the MD2 Algorithm
YAML (0.73) - YAML Ain't Markup Language (tm)
CPAN::Meta (2.112621) - the distribution metadata for a CPAN dist
...
I usually include a text file containing the output of this command to my backups, this will help a lot in case of disaster recovery.
Last edited by angel115; 12-12-2011 at 06:24 AM.
|
|
|
All times are GMT -5. The time now is 08:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|