In this short post, we will discuss on how to install a perl module using CPAN.
First, login to the CPAN interactive shell using the command:
# cpan
Once, you are in, install a module using the syntax,
cpan> install package:function
eg, to install the module JSON::Parse, hit the following in the shell :
cpan> install JSON::Parse
The installation will check for certain test cases. If any of those tests fail, you wont be able to install the module. Analyse the result of the tests and if you feel you are good to go, even with the failed result, force install the module using :
cpan> force install JSON::Parse
Thats it !