pavement

CPAN

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
(dead-end article ; link to perl and ports tree. Expand and cat)
Line 1: Line 1:
Comprehensive Perl Archive Network
+
The '' '''C'''omprehensive '''P'''erl '''A'''rchive '''N'''etwork'' is a repository of thousands of tested and documented, re-useable modules providing functionality that you can use in your [[Perl]] scripts. 
  
To install perl modules via CPAN, run
+
==CPAN ports==
  # cpan -i XXX:CGI-something:module
+
Many of these modules can be installed using the FreeBSD [[ports tree]]. This is by far to be preferred over installing them using the <code>cpan</code> 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 <code>cpan</code> program.
where XXX:CGI-something:module is the exact name of the module you want to install (case-sensitive, so be careful...)
+
 
 +
==The <code>cpan</code> 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 <code>cpan</code> command interface.  On FreeBSD, modules installed with <code>cpan</code> are listed in the package database as <code>bsdpan-</code> 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:
 +
<u>cpan</u>> '''help'''
  
 
See http://www.cpan.org/
 
See http://www.cpan.org/
 +
 +
[[Category:Ports and Packages]]

Revision as of 15:07, 13 June 2006

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