FreeKB - Perl (Scripting) Determine if a module is installed
Perl (Scripting) - Determine if a module is installed

When a module is installed in Perl, such as Net::SSH::Perl or Net::LDAP, the module adds information to a file called perllocal.pod on your system. The perllocal.pod is usually located at /usr/local/lib/perl5/version/arch. The vast majority of modules append information to the perllocal.pod file. The perldoc -l module_name command will determine if the perllocal.pod file contains an entry for a certain module. In this example, the Net::SSH::Perl module is installed on the system. Be careful, as this search is CaSe SenSiTiVe.

~]# perldoc -l Net::SSH::Perl

In this example, the Net::LDAP module is probably not installed, as there are no matches for Net::LDAP in the perllocal.pod file.

~]# perldoc -l Net::LDAP
No documentation found for "Net::LDAP".


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 880ca in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |