pavement

CPAN

From FreeBSDwiki
Revision as of 15:07, 13 June 2006 by Ninereasons (Talk | contribs)
Jump to: navigation, search

The Comprehensive Perl Archive Network is a repository of thousands of tested and documented, re-useable modules providing functionality that you can use in your Perl scripts.

CPAN ports

Many of these modules can be installed using the FreeBSD ports tree. This is by far to be preferred over installing them using the cpan program. CPAN modules installed from ports can be automatically updated just like any other port. As with other ports, compatibility issues are monitored, and modules incompatible with your configuration are flagged. Search the ports tree first, for the module that you want to install, before resorting to the cpan program.

The cpan program

Many of the CPAN modules are not available from ports; and for these you will probably want to compile and install them yourself using the cpan command interface. On FreeBSD, modules installed with cpan are listed in the package database as bsdpan- packages. They will not be automatically upgraded.

Install specified perl modules:

cpan module_name [ module_name ... ]

Install modules with extra behavior (clean, force, install (optional switch), make, test):

cpan [-cfimt] module_name [ module_name ... ]

The CPAN shell is very simple to use. Start without arguments:

cpan

In the shell, there's a host of useful commands:

cpan> help

See http://www.cpan.org/

Personal tools