1829010 Members
2348 Online
109986 Solutions
New Discussion

Perl Modules

 
Network Servers
Advisor

Perl Modules

How does one find out what perl modules are installed?

perl - what?

Thanks!
Don't fly off the handle when you are full of baloney...
2 REPLIES 2
Slawomir Gora
Honored Contributor

Re: Perl Modules

Hi,

Typing "perl -V" at a shell prompt will also show you the @INC
directories where perl looks for modules and you can "ls" in those
locations for more information.
H.Merijn Brand (procura
Honored Contributor

Re: Perl Modules

No option for that. Best guess is to do

# man perllocal

or

# perldoc local

The latter is (far) more accurate.

This is however no guarantee that the modules installed are still there, because there is no (consistent) way to uninstall modules in perl.

This is also no guarantee to be a *complete* list, since some modules are installed outside of the default perl tree to allow multiple versions living together and depend on $PERL5LIB. Mainly applied to DBD::* where there are multiple database versions on the system that each need their own version of the same module.

If you want a complete list of available modules, either core, or later added, do

# perl -MFile::Find -le'find(sub{/\.pm$/ and$pm{$File::Find::name}++},@INC);print for sort keys%pm'

This also includes all (sub)module files that are included in larger modules like Tk or DBI

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn