CPAN

CPAN ( Comprehensive Perl Archive Network engl. ) is a world mirrored online repository for Perl modules, applications and documentation, which was launched following the TeX CTAN Library on 25 October 1995 and quickly become the de facto standard developed. It offers the option of a convenient to install and manage Perl modules. Today, the CPAN includes around 260 servers across five continents and contains about 29,000 distributions of over 11,000 authors with a volume of about 17 GB.

Formation

The repository was created from simple linked, private websites, the free Perl modules are offered for downloading and their operators is called perl- packrats. The side of the Finn Jarkko Hietaniemi thereby became the pioneer which was usually very up to date and most of the modules contained. She was always self-evident mirrored by the other, to Jarkko the content of the important archives united and thus the CPAN created. Andreas König extended this archive to the PAUSE (Perl Authors Upload Server) that allows authors to publish their own modules on CPAN. Other parts of what is visible as CPAN today, go back again to the improvements by Jarkko. Only search options and the CPAN multiplexer are the work of other Perl veterans.

Regulate

Part of the success is due to the fact that have established themselves over the years, strict standards for highly loaded modules. Each module should contain at least a manifest file, a readme file, meta-information in the form of a META.yml file and an install script. In addition, all functions should be provided directly in the source code with POD documentation. In addition, as many test scripts should be included, they are automatically executed during an install and their results ( with the consent of the user ) is also automatically sent back to CPAN. So the author can obtain test results from different systems within a short time.

CPAN module

With the module CPAN by Andreas König, one can easily from a command line - regardless of operating system - looking for a Perl module on CPAN, download, test, install, upgrade or uninstall. This is also interactive with the included CPAN shell ( no shell in the proper sense ) possible that you simply invokes by typing cpan. For this, the alternatives CPANPLUS and CPANMINUS formed. Especially the latter is often recommended for beginners because of their very simple way and use short, precise spending, but must as a module ' App :: cpanminus ' to install CPAN wohingegehen from the start is included.

Install modules

Perl Makefile.PL make make test make install CPAN modules are installed with the classic make utility, and like some of Autoconf, but the makefile is created only on the target computer on which the CPAN module to be installed, too. This is realized obvious Supplied with a Perl program, which is about the call to. / Configure with autoconf.

An installation then proceeds as in an ordinary program (see right): With the source code, if necessary, make will compile (eg operating system-dependent parts that are written in C), make test with the supplied test programs are running and make will install the CPAN module installed in the prescribed by the Perl installation target directory.

Extensions

In recent years there have been several initiatives that the CPAN gave new functions or that have been added:

  • Phalanx Project - initiative for improving the documentation and test coverage of Perl and its main modules 100.
  • CPAN Testing Service ( CPANTS ) - A service that automatically checks all possible distributions on formal shortcomings.
  • CPAN Testers - check new module versions on their ability to run on different operating systems and configurations.
  • CPAN Ratings - Reviews ( 0 to 5 stars ) and reviews of modules.
  • Annotated CPAN - ability for users to add comments to the documentation of the modules that can be also displayed.

Alternative

ActiveState ActivePerl distribution to its supplies with a comparable range of functions tool called ppm, which takes its files but not directly from CPAN, but from a derived repository containing prebuilt packages for some operating systems such as Linux, Solaris and Windows.

199367
de