Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


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

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

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

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

Old 09-01-2009, 01:56 AM   #4
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 01:55 AM. Reason: Extra comment
Old 09-03-2009, 03:44 PM   #5
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, 03:20 PM   #6
LQ Newbie
Registered: Sep 2009
Posts: 6

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

3 members found this post helpful.
Old 10-05-2009, 06:12 PM   #7
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, 09:54 PM   #8
Registered: Dec 2008
Location: Bellevue,WA
Distribution: RHEL 5 , Fedora ,Sabayon,Solaris,Vmware,AWS
Posts: 107

Rep: Reputation: 18
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:

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 09:59 PM.
Old 12-12-2011, 04:48 AM   #9
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
For reference you can use this as well:
Which give this output:
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 05:24 AM.


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 02:48 PM
list modules acidjuice Slackware 4 05-09-2005 04:00 PM
how to list/install perl modules lsimon4180 Linux - Software 1 10-02-2004 12:57 PM
Can I Get A List Of Modules Loaded In The Kernel ? linu_soft Programming 2 06-28-2004 06:39 AM
perl modules mairul Linux - Newbie 13 03-08-2004 09:41 PM > Forums > Linux Forums > Linux - General

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

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