Thursday, March 28, 2013

Perl Module


Install CPAN modules into your local Perl library using CPAN
By default, you need to have admin (root) privileges to install Perl modules - see the next section if you don't.
Installation is straightforward if your machine has Internet access. It is assumed that you have the CPAN perl module installed (this is normally the case).
The make utility must be available before using Bundle::CPAN. On CentOS 6.3 minimal you must run yum install make.
Invoke the CPAN shell:
# perl -MCPAN -e shell
If you run this for the first time it asks you some configuration questions. In most cases it works just fine if you tell it to "go figure it out yourself." Once configured you will see a cpan> shell prompt.
The first thing you should do is to upgrade your CPAN:
cpan> install Bundle::CPAN
Once ready, type:
cpan> reload cpan
Now it is time to install the additional modules you need. For example, to retrieve, configure and install the DateTime::TimeZone module, type:
cpan> install DateTime::TimeZone
If needed you will be prompted to install other modules this module depends on.



Install Perl module

A) Start CPAN Shell:
# perl -MCPAN -e shell

B) Install a perl module:
   At cpan> shell prompt install module using install module::Name command.
   For example install module called MIME::Lite:

# cpan> install MIME::Lite


List installed perl module

 # instmodsh

No comments:

Post a Comment