User Tools

Site Tools


tutorials:perl_cpan

This is an old revision of the document!


Using the Comprehensive Perl Archive Network (CPAN)

CPAN

  • CPAN is a large collection of perl modules.

Installing modules

To call the CPAN shell interface, use:

$ sudo perl -MCPAN -e shell

Using sudo allows for system-wide installation of new modules. When the call is successful, you should see a shell interface:

cpan[1]> 

For example, if we want to install bioperl, first we can do a listing with the following command:

cpan[1]> d /bioperl/ CPAN: Storable loaded ok (v2.20) Going to read '/home/chkuo/.cpan/Metadata'

Database was generated on Thu, 08 Jul 2010 06:27:10 GMT

Distribution BIRNEY/bioperl-1.2.2.tar.gz Distribution BIRNEY/bioperl-1.2.3.tar.gz Distribution BIRNEY/bioperl-1.2.tar.gz Distribution BIRNEY/bioperl-1.4.tar.gz Distribution BIRNEY/bioperl-db-0.1.tar.gz Distribution BIRNEY/bioperl-ext-1.4.tar.gz Distribution BIRNEY/bioperl-gui-0.7.tar.gz Distribution BIRNEY/bioperl-run-1.4.tar.gz Distribution BOZO/Fry-Lib-BioPerl-0.15.tar.gz Distribution CJFIELDS/BioPerl-1.6.0.tar.gz Distribution CJFIELDS/BioPerl-1.6.1.tar.gz Distribution CJFIELDS/BioPerl-db-1.6.0.tar.gz Distribution CJFIELDS/BioPerl-network-1.6.0.tar.gz Distribution CJFIELDS/BioPerl-run-1.6.1.tar.gz Distribution CRAFFI/Bundle-BioPerl-2.1.8.tar.gz 15 items found

cpan[2]> install CJFIELDS/BioPerl-1.6.1.tar.gz

# the installer will run a bunch of tests here # a small number of tests are likely to fail # # to install anyway, use 'force install'

cpan[3]> force install CJFIELDS/BioPerl-1.6.1.tar.gz

tutorials/perl_cpan.1330581458.txt.gz · Last modified: 2012/03/01 13:57 by chkuo