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.
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
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:
In the shell, there's a host of useful commands: