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 rt.cpan.org. 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 www.CPAN.org, but probably the most used is search.CPAN.org 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.

www.CPAN.org and search.CPAN.org is and index and archive of modules. To be able actually to upload a distribution with modules you need to register at pause.CPAN.org. After this registration it is possible to upload .tar.gz file.

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

Links: How to make CPAN-like module

3. Aug 2008
Jozef