Difference between revisions of "Installing PERL modules using CPAN"

From Organic Design wiki
(Change source-code blocks to standard format)
 
Line 11: Line 11:
 
==Installing modules==
 
==Installing modules==
 
Once you know the module name you would like to install, you need to sudo as root and install the module, e.g.
 
Once you know the module name you would like to install, you need to sudo as root and install the module, e.g.
{{code|<perl>
+
<source lang="perl">
 
sudo -s
 
sudo -s
 
perl -MCPAN -e 'install Statistics::ChiSquare'
 
perl -MCPAN -e 'install Statistics::ChiSquare'
</perl>}}
+
</source>
  
 
==Interactive CPAN environment==
 
==Interactive CPAN environment==
 
Type;
 
Type;
{{code|<perl>
+
<source lang="perl">
 
perl -MCPAN -s shell
 
perl -MCPAN -s shell
 
# list of useful commands
 
# list of useful commands
Line 28: Line 28:
 
make  
 
make  
 
install
 
install
</perl>
+
</source>
}}
 

Latest revision as of 18:11, 22 May 2015

Procedure.svg Installing PERL modules using CPAN
Organic Design procedure

Documentation is available at perldoc CPAN.

Searching CPAN

The website http://search.cpan.org provides a search box to search for keywords associated with packages.

Installing modules

Once you know the module name you would like to install, you need to sudo as root and install the module, e.g.

sudo -s
perl -MCPAN -e 'install Statistics::ChiSquare'

Interactive CPAN environment

Type;

perl -MCPAN -s shell
# list of useful commands
help # list of available commands
o conf # configuration of CPAN
r # reinstall recommendations
i /statistics/ # pattern searching of authors, bundles, distributions, modules
get [Package] # fetch
make 
install