Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a list of installed CPAN modules?

Tags:

perl

cpan

Aside from trying

perldoc <module name> 

individually for any CPAN module that takes my fancy or going through the file system and looking at the directories I have no idea what modules we have installed.

What's the easiest way to just get a big list of every CPAN module installed? From the command line or otherwise.

like image 745
David McLaughlin Avatar asked Sep 22 '08 15:09

David McLaughlin


People also ask

How do I list installed perl modules?

Check installed perl modules via terminal Available commands are: l - List all installed modules m <module> - Select a module q - Quit the program cmd? Then type l to list all the installed modules, you can also use command m <module> to select the module and get its information. After finish, just type q to quit.

Where do CPAN modules get installed?

CPAN doesn't actually install files. It runs the install script embedded in each distribution, which then performs the actual install. For distributions using ExtUtils::MakeMaker, the defaults are documented here: https://metacpan.org/pod/ExtUtils::MakeMaker#make-install (and the default value of INSTALLDIRS is site ).


2 Answers

This is answered in the Perl FAQ, the answer which can be quickly found with perldoc -q installed. In short, it comes down to using ExtUtils::Installed or using File::Find, variants of both of which have been covered previously in this thread.

You can also find the FAQ entry "How do I find which modules are installed on my system?" in perlfaq3. You can see a list of all FAQ answers by looking in perlfaq

like image 164
pjf Avatar answered Sep 25 '22 21:09

pjf


perldoc perllocal 

Edit: There's a (little) more info about it in the CPAN FAQ

like image 37
Dan Avatar answered Sep 25 '22 21:09

Dan