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

Updated:   |  Perl (Scripting) articles

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
/usr/local/lib64/perl5/Net/SSH/Perl.pm


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".

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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