CPAN-shell install: Difference between revisions
imported>MichaelDondrup No edit summary |
m (3 revisions) |
||
(One intermediate revision by one other user not shown) | |||
Line 16: | Line 16: | ||
<pre><nowiki> | <pre><nowiki> | ||
perl -MCPAN -e shell | root# perl -MCPAN -e shell | ||
</nowiki></pre> | </nowiki></pre> | ||
Line 30: | Line 30: | ||
<pre><nowiki> | <pre><nowiki> | ||
install My::Module | cpan> install My::Module | ||
</nowiki></pre> | </nowiki></pre> | ||
Latest revision as of 07:18, 26 October 2011
Short intro on howto use the CPAN shell for installing perl modules
Note: If there is a package for the perl-module you wish to install in the distribution of your operating system, we recommend to use the package management system instead of CPAN shell.
Prerequisites
- Perl is installed
- The CPAN module is installed. We recommend to use the package management system of you operating system distribution to install it. (or download from: http://search.cpan.org/~andk/CPAN/).
Starting the cpan shell
You need to become a privileged user to install perl-modules (On small/semi-professional/Linux installations this is often root).
type
root# perl -MCPAN -e shell
Configuring cpan shell
When started for the first time, cpan-shell will ask you a few questions for interactive configuration. Take special care about selecting CPAN mirror sites close to you and about your proxy settings.
Installing modules
To install the module My::Module
from within the cpan-shell type
cpan> install My::Module
cpan-shell will download the module source code, make and install it automatically.
For more information about the interactive install or trouble-shooting consult the documentation of the CPAN module.