| Previous | Next
CPANLets you access CPAN; search for a module, a bundle, an author, or a distribution; download a module or distribution; install it; and perl -MCPAN -eshell; # Run from the command line or:
This section describes the use of the CPAN module from a program. See "Installing Perl" for information on using it interactively and for details of the available commands. These commands, available interactively from the shell, are methods of the class CPAN::Shell. From a program, they are available both as methods (e.g., Each of the commands that produce listings of modules ( Session and Cache ManagersThe CPAN module contains a session manager, which keeps track of objects that have been fetched, built, and installed in the current session. No status is retained between sessions. There is also a cache manager, which keeps track of disk space used and deletes extra space. The cache manager keeps track of the build directory, The original distribution files are kept in the directory BundlesThe CPAN module recognizes a bundle as a Perl module in the namespace Bundle:: that does not define any functions or methods and usually contains only pod documentation. It starts like a Perl module with a package declaration and a =head1 CONTENTS This section consists of lines such as:
in which Bundles are treated specially in the CPAN package. When you tell CPAN to install a bundle, it installs all the modules in the CONTENTS section of the pod. You can install your own bundles locally by placing a conforming bundle file somewhere in your ConfigurationWhen the CPAN module is installed, a site-wide configuration file is created: CPAN/Config.pm. The default values defined there can be overridden locally in the file CPAN/MyConfig.pm. You can store this file in $HOME/.cpan/CPAN/MyConfig.pm, because $HOME/.cpan is added to the search path of the CPAN module before the tutorial SupportThe urllist parameter in the configuration table contains a list of URLs that will be used for downloading. If the list contains any file URLs, CPAN looks there first for files (except index files). So if you are using a tutorial containing the CPAN contents, include the tutorial as a file URL at the end of urllist since it is likely to be out-of-date. You can do this with: o conf urllist push file://localhost/CDROM/CPAN |