tutorials:perl_cpan
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:perl_cpan [2012/03/01 13:57] – created chkuo | tutorials:perl_cpan [2012/03/01 14:02] (current) – chkuo | ||
---|---|---|---|
Line 4: | Line 4: | ||
* [[http:// | * [[http:// | ||
- | ==== Installing modules ==== | + | ===== Installing modules |
To call the CPAN shell interface, use: | To call the CPAN shell interface, use: | ||
<code bash> | <code bash> | ||
Line 11: | Line 11: | ||
Using sudo allows for system-wide installation of new modules. When the call is successful, you should see a shell interface: | Using sudo allows for system-wide installation of new modules. When the call is successful, you should see a shell interface: | ||
- | < | + | < |
cpan[1]> | cpan[1]> | ||
</ | </ | ||
For example, if we want to install bioperl, first we can do a listing with the following command: | For example, if we want to install bioperl, first we can do a listing with the following command: | ||
+ | < | ||
cpan[1]> d /bioperl/ | cpan[1]> d /bioperl/ | ||
+ | </ | ||
+ | |||
+ | This should generate some output similar to the following: | ||
+ | < | ||
CPAN: Storable loaded ok (v2.20) | CPAN: Storable loaded ok (v2.20) | ||
Going to read '/ | Going to read '/ | ||
Line 37: | Line 41: | ||
Distribution | Distribution | ||
15 items found | 15 items found | ||
- | + | </ | |
+ | |||
+ | From this list, we can see that the '' | ||
+ | < | ||
cpan[2]> install CJFIELDS/ | cpan[2]> install CJFIELDS/ | ||
- | + | </ | |
- | # the installer will run a bunch of tests here | + | |
- | # a small number of tests are likely to fail | + | Usually this should work for most modules and all required dependencies should be installed automatically. Bioperl is unusual because it contains |
- | # | + | < |
- | # to install anyway, use 'force install' | + | |
- | + | ||
cpan[3]> force install CJFIELDS/ | cpan[3]> force install CJFIELDS/ | ||
+ | </ | ||
tutorials/perl_cpan.1330581458.txt.gz · Last modified: 2012/03/01 13:57 by chkuo