CPANPLUS - Command-line access to the CPAN interface


CPANPLUS - Command-line access to the CPAN interface


This document describes version 0.045 of CPANPLUS, released October 5, 2003.


CPANPLUS will appear in Perl core in version 5.10, under an as-yet undetermined name. will be deprecated. CPANPLUS is not a drop-in replacement for

A shell interface which resembles the shell aspects (and not the programming interface) of is available. Refer to the CPANPLUS::Shell manpage for information on switching to the Classic shell.


Command line:

    perl -MCPANPLUS -e 'shell'
    perl5.6.1 -MCPANPLUS -e 'install Net::SMTP'
    perl -MCPANPLUS -e 'fetch /K/KA/KANE/'
    perl5.00503 -MCPANPLUS -e 'get /K/KA/KANE/'

Note that one CPANPLUS installation can be used for multiple versions of Perl. If no version is specified, the Perl version used to install CPANPLUS will be used.


    use CPANPLUS;
    # This use is not recommended; use
    # CPANPLUS::Backend instead!


CPANPLUS provides command-line access to the CPAN interface. Three functions, fetch, install and shell are imported in to your namespace. get--an alias for fetch--is also provided.

Although CPANPLUS can also be used within scripts, it is highly recommended that you use the CPANPLUS::Backend manpage in such situations. In addition to providing an OO interface, CPANPLUS::Backend is more efficient than CPANPLUS for multiple operations. CPANPLUS is provided primarily for the command-line, in order to be backwards compatible with

The first time you run CPANPLUS you should be prompted to adjust your settings, if you haven't already done so. Your settings will determine treatment of dependencies, handling of errors, and so on.



This function requires the full name of the module, which is case sensitive. The module name can also be provided as a fully qualified file name, beginning with a /, relative to the /authors/id directory on a CPAN mirror.

It will download, extract and install the module.


Like install, fetch needs the full name of a module or the fully qualified file name, and is case sensitive.

It will download the specified module to the current directory.


Get is provided as an alias for fetch for compatibility with


Shell starts the default CPAN shell. You can also start the shell by using the cpanp command, which will be installed in your perl bin.

See the CPANPLUS::Shell::Default manpage for instructions on using the default shell. Note that if you have changed your default shell in your configuration, that shell will be used instead. If for some reason there was an error with your specified shell, you will be given the default shell.

You may also optionally specify another shell to use for this invocation (which is a good way to test other shells): perl -MCPANPLUS -e 'shell Classic'

Shells are only designed to be used on the command-line; use of shells for scripting is discouraged and completely unsupported.


This module by Jos Boumans <>.

This pod text by Ann Barcomb <>.


The CPAN++ interface (of which this module is a part of) is copyright (c) 2001, 2002 Jos Boumans <>. All rights reserved.

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.


Please see the AUTHORS file in the CPANPLUS distribution for a list of Credits and Contributors.


the CPANPLUS::Backend manpage, the CPANPLUS::Shell::Default manpage


 CPANPLUS - Command-line access to the CPAN interface