HostOnNet Blog

Installing CPAN

CPAN is a collection of Perl Modules. Perl Modules are pre written perl programs that you can reuse in your scripts. This will save you time of writing all the codes yourself.
 
To install CPAN modules on Linux or FreeBSD server, you can run the command “cpan” in command prompt.
 
# cpan
cpan >
 
To install a module, say if you need to install Net::SSLeay Cpan module, you have to do
 
# cpan
cpan > install Net::SSLeay
cpan > exit
#
 
After installing you can exit cpan shell by typing the command “exit”
 
At times, you need to upgrade the cpan modules itself, if there is new version of cpan module available, this can also done with cpan shell.
 
# cpan
cpan > install Bundle::CPAN
cpan > reload cpan
cpan > exit
#
 
reload cpan command will reload newly install cpan shell. After reloading you can continue working with cpan shell.

Posted in Uncategorized. Bookmark the permalink.