Main Navigation


Using CPAN with Perl

Learn Perl Now!
And get a job doing Perl.

“CPAN” stands for the Comprehensive Perl Archive Network and is an internationally mirrored collection of over 30,000 packages of re-usable Perl code. To program in Perl 5 effectively, one needs to make a judicious, but liberal use of CPAN code, due to the fact that the perl core distribution is kept relatively minimal and its maintainers expect people to use CPAN for any extraneous functionality.

One good advice in using CPAN is to look for native packages for your operating system, distribution and Perl distribution. Many such distributions allow one to automatically install pre-built CPAN packages that can later on be easily and cleanly uninstalled. Look for such packages for distributions you need in the relevant repositories of the distribution of perl 5 that you are using.

If you cannot find packages for what you want, you can also try building a native package automatically from the equivalent CPAN package. We have the details of wrappers of CPAN modules for the various distributions (originally from the PerlNet wiki).

Life with CPAN

These resources provide a gentle introduction to how to effectively work with CPAN in case you want to use it directly. Read them in order.

Finding Stuff on the CPAN

Preparing Your Own CPAN-like Distributions