Bootstrap FreeKB - Perl (Scripting) - Install a module using cpanm
Perl (Scripting) - Install a module using cpanm

Updated:   |  Perl (Scripting) articles

cpan or cpanm (this article) can be used to install a Perl module.

Before installing a module, you may want to use the perldoc command to determine if the module is installed.

perldoc -l Net::SSH:Perl

 

Or this command.

perl -MNet::SSH::Perl -e 'print $INC{"Net/SSH/Perl.pm"}'

 

On a Linux system, apt-get (Debian, Ubuntu), dnf or yum (CentOS, Fedora, Red Hat) can be used to install cpanm.

dnf install cpanminus

 

Here is how you would install a module using cpanm.

cpanm the::module

 

For example.

cpanm JSON::Create

 

A successful install of a module that is not already installed will return the following.

Successfully installed module::name-version

 

A successful update of an already installed module will return the following.

module::name is up to date. (version)

 




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 dad70d in the box below so that we can be sure you are a human.