Friday, December 31, 2010

How to install a module from CPAN?

The easiest way is to have a module also named CPAN do it for you. This module comes with perl version 5.004 and later.

$ perl -MCPAN -e shell
  cpan shell -- CPAN exploration and modules installation(v1.59_54)        
  ReadLine support enabled      
cpan> install Some::Module  
To manually install the CPAN module, or any well-behaved CPAN module for that matter, follow these steps:

Unpack the source into a temporary area.

perl Makefile.PL     
make     
make test     
make install 

No comments:

Post a Comment