CPAN - Comprehensive Perl Archive Network

CPAN is an archive of Perl module distributions that has mirrors all over the world. Perl distribution is basically one .tar.gz file containing: one or more modules (.pm), documentation (README, Changes, integrated Pod), tests (in t/ folder), scripts (mostly in script/ folder, or in the root folder) and one installation script (Build.PL or Makefile.PL). This installation script has other modules dependencies inside. This way a unified installation procedure is acquired. The goal of CPAN besides the storage is to index modules - search. And also there are some tools to make the module authors life easier.

There are 58000 modules 15476 distributions and 6707 authors registered on CPAN. And the number of uploaded modules is raising. To have a picture which ones are worth using it's hard to tell. It is possible to add distribution review but it's not used too much. Some times a good guess is needed or the trial error procedure. When the module is good but it's missing something there are three approaches to this issue. First is to create own version under different name. Second is to create plugin that will extend the module, but the last one (probably the best) is to get in contact with the original author and send him a patch using In this case make sure to include tests for the given change. Otherwise the patch can be refused or it can take quite some time till it's accepted.

The main page of CPAN is, but probably the most used is where the modules can be looked up.

What can be a motivation to upload a module? For example to show others what is she/he working on currently, get some comments, find someone else that have the same interests and who is willing to improve the module. Quite important is the possibility to show the programming skills when passing the interview. The CPAN indexing and tools are really nice, installation using CPAN shell is easy, automated smoke tests will check if the module works also on other systems or architectures. and is and index and archive of modules. To be able actually to upload a distribution with modules you need to register at After this registration it is possible to upload .tar.gz file.

What else has the CPAN to offer? Request tracker ( bug can be tracked and logged here or even wishes for module improvements. AnnoCPAN ( allows to add comments to the Pod documentation. CPAN Ratings ( allows to rate the distributions. CPAN Tools - Diff and Grep.

Links: How to make CPAN-like module

3. Aug 2008