LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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



Reply
 
Search this Thread
Old 08-12-2004, 06:49 AM   #1
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
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.
 
Old 08-12-2004, 08:41 AM   #2
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 90
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
 
Old 08-25-2004, 11:14 AM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 927

Rep: Reputation: 30
I had the same question, and this works wonderfully - thanks for posting your solution!

-Laura
 
Old 09-01-2009, 02:56 AM   #4
kpramod
LQ Newbie
 
Registered: Sep 2009
Location: India
Posts: 1

Rep: Reputation: 0
Lightbulb 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
 
Old 09-03-2009, 04:44 PM   #5
queengeek
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
Thumbs up 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!
 
Old 09-20-2009, 04:20 PM   #6
linuxcares12
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Rep: Reputation: 1
Use the following command and type "l" in the prompt to list all installed perl modules.

Quote:
instmodsh
Thanks.
 
1 members found this post helpful.
Old 10-05-2009, 07:12 PM   #7
Rooth
LQ Newbie
 
Registered: Sep 2009
Location: Colorado
Distribution: RedHat 5, SuSE 10
Posts: 9

Rep: Reputation: 1
And another thanks from me. This just addressed a problem in like 30 seconds. All hail LQ (and google)!
 
Old 01-02-2010, 10:54 PM   #8
++nick++
Member
 
Registered: Dec 2008
Location: Bellevue,WA
Distribution: RHEL 5 , Fedora ,Sabayon,Solaris,Vmware,AWS
Posts: 107

Rep: Reputation: 18
Quote:
Originally Posted by SharpyWarpy View Post
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.
 
Old 12-12-2011, 05:48 AM   #9
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 494

Rep: Reputation: 75
For reference you can use this as well:
Code:
pmall
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I Need Perl Modules!!! benmay05 Programming 2 07-01-2005 03:48 PM
list modules acidjuice Slackware 4 05-09-2005 05:00 PM
how to list/install perl modules lsimon4180 Linux - Software 1 10-02-2004 01:57 PM
Can I Get A List Of Modules Loaded In The Kernel ? linu_soft Programming 2 06-28-2004 07:39 AM
perl modules mairul Linux - Newbie 13 03-08-2004 10:41 PM


All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration