FreeKB - Perl Install a module (cpan)
Perl - Install a module (cpan)

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"}'

 

Installing a module in Perl is incredibly easy, using cpan. cpan is included with the installation of Perl. Simply type the following command on the command line.

cpanm the::module

 

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)

 

Or, you can start the cpan interactive prompt.

cpan

 

Then, use the install module_name (or force install) command to install a module. In this example, the SSH module is installed.

cpan> install Net::SSH::Perl

 



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




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |