CPAN-shell install: Difference between revisions
imported>MichaelDondrup No edit summary |
imported>MichaelDondrup No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
= Short intro on howto use the CPAN shell for installing perl modules = | = 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 == | == 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 == | == 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 | |||
<pre><nowiki> | |||
perl -MCPAN -e shell | |||
</nowiki></pre> | |||
== Configuring cpan 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 == | == Installing modules == | ||
For more information about the interactive install consult the [http://search.cpan.org/~andk/CPAN/lib/CPAN.pm#Interactive_Mode documentation of the CPAN module]. | To install the module <code><nowiki> My::Module </nowiki></code> from within the cpan-shell type | ||
<pre><nowiki> | |||
install My::Module | |||
</nowiki></pre> | |||
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 [http://search.cpan.org/~andk/CPAN/lib/CPAN.pm#Interactive_Mode documentation of the CPAN module]. |
Revision as of 10:04, 9 November 2005
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
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
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.