Skip to main content Start of main content

CPAN

CPAN, the Comprehensive Perl Archive Network, is the central archive of free Perl modules, scripts and documentation contributed by the Perl community.

It is distributed through a worldwide network of mirrors, so Perl developers can download and install modules from a server close to them.

Modules can be searched on MetaCPAN and installed with the cpan or cpanm command-line clients.

CPAN banner
CPAN logo

CPAN overview

Most Linux distributions include Perl and the cpan client. Many popular CPAN modules are also packaged as RPM or DEB packages, which is often the easiest way to install them on servers.

Download CPAN

Perl modules and documentation

CPANThe Comprehensive Perl Archive Networkweb

MetaCPANSearch CPAN modules and documentationweb

We take security seriously

Every CPAN author directory includes a signed CHECKSUMS file listing a checksum for each distribution in it.

  1. Install modules from a trusted CPAN mirror using the cpan or cpanm client.

  2. The cpan client checks each download against the CHECKSUMS file in the author's directory before installing it.

  3. If you download a distribution by hand, compare its checksum with the matching entry in the author's CHECKSUMS file.

  4. For a manually downloaded distribution, run the following and compare the result with the CHECKSUMS file. Replace FILE with the actual filename.

    sha256sum FILE

Continue only when verification succeeds. If a checksum or signature fails, download the file again and verify it before installing.

Download verification illustration

Installing Perl modules from CPAN

# Install a module with the cpan client
cpan Module::Name

# Or with cpanminus
cpanm Module::Name

By clicking on and downloading CPAN, you agree to comply with the US Export Control Policy.