Questions tagged [cpan]

CPAN is the Comprehensive Perl Archive Network, a code and documentation archive of over 100,000 open-source Perl modules across more than 25,000 distributions written by more than 10,000 authors. This tag is not for general Perl questions; use the [perl] tag instead.

The Comprehensive Perl Archive Network (CPAN) is an open-source code and documentation archive of over 100,000 Perl modules across more than 25,000 distributions written by more than 10,000 authors.

CPAN has been online since October 1995 and is constantly growing. CPAN's main purpose is to provide a distributed repository for Perl programmers to locate, install, and share open source modules and code snippets.

Installable files on the CPAN are known as distributions. A distribution consists of one or more modules, documentation files (generally in ), or scripts. Distributions are typically packaged with an install script called Makefile.PL or Build.PL.

When to use this tag?

This tag is not for general Perl questions; use instead. This tag should be used for questions relating to cpan.org or modules for interacting with cpan.org and mirrors (like CPAN.pm ) ...

Documentation

CPAN Installation tools for end users

  • CPAN - the classic CPAN command line install shell
  • CPANPLUS - an updated API and command line interface to CPAN intended to be more scriptable
  • cpanminus - a faster and more concise CPAN installer
  • CPAN::Mini - create a minimal mirror of CPAN

Modules used for creating install/distribution scripts

  • ExtUtils::MakeMaker - the venerable module used to generate a make file via Makefile.PL.
  • Module::Install - a drop-in replacement for ExtUtils::MakeMaker that provides more intuitive features and customization for module authors
  • Module::Build - a mostly pure Perl alternative to ExtUtils::MakeMaker, which does not rely on a system make command.
  • Dist::Zilla - distribution builder
  • pip - Perl Installation Program

Related Links

1203 questions
236
votes
24 answers

What's the easiest way to install a missing Perl module?

I get this error: Can't locate Foo.pm in @INC Is there an easier way to install it than downloading, untarring, making, etc?
dreeves
  • 26,430
  • 45
  • 154
  • 229
148
votes
5 answers

How do I update all my CPAN modules to their latest versions?

How do I update all my CPAN modules to their latest versions?
David B
  • 29,258
  • 50
  • 133
  • 186
123
votes
10 answers

How do I tell CPAN to install all dependencies?

How do I tell CPAN to install all dependencies? I tried setting these in cpan: cpan> o conf prerequisites_policy follow cpan> o conf commit I still had to answer "y" a couple of times (but fewer than before it feels like). Is there a way to get it…
Nifle
  • 11,745
  • 10
  • 75
  • 100
108
votes
27 answers

How do I get a list of installed CPAN modules?

Aside from trying perldoc individually for any CPAN module that takes my fancy or going through the file system and looking at the directories, I have no idea what modules we have installed. What's the easiest way to just get a big…
David McLaughlin
  • 5,108
  • 4
  • 34
  • 35
88
votes
6 answers

How can I de-install a Perl module installed via `cpan`?

I am using Perl running in user space (not installed via root) and installing modules via the command-line cpan. I would like to know if there is a simple way to remove a module without having to do a lot of work deleting individual files. I…
user181548
85
votes
5 answers

How can I use CPAN as a non-root user?

I want to install perl modules on a shared server on which I do not have root access. How can I do this? They also seem to have an older version of CPAN (it complains about that when running the command), is it possible to update the CPAN command…
Juan A. Navarro
  • 10,595
  • 6
  • 48
  • 52
75
votes
5 answers

Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)

There are multiple installers for cpan modules available; I know of at least CPAN.pm (comes with perl,) CPANPLUS, and cpanminus. What is the difference between the three? What situations call for using one over the other? Are there other module…
Sean McMillan
  • 10,058
  • 6
  • 55
  • 65
75
votes
6 answers

How can I install a specific version of a set of Perl modules?

I'm tasked with replicating a production environment to create many test/sit environments. One of the things I need to do is build up Perl, with all the modules which have been installed (including internal and external modules) over the years. I…
Matthew Watson
  • 14,083
  • 9
  • 62
  • 82
74
votes
4 answers

Installing modules using Strawberry Perl

Until now I used ActiveState's ActivePerl, and used the ppm for installing modules. Last week I moved to Strawberry Perl, but I don't know how I should install modules using Strawberry Perl. What is some information on how module installation is…
ronssd
  • 741
  • 1
  • 5
  • 3
69
votes
5 answers

How can I install a CPAN module into a local directory?

I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory. When I try to install a CPAN module by doing the usual: perl Makefile.PL make test make install That module is extracted to a blib/lib/ folder. I…
Ram
  • 3,034
  • 11
  • 38
  • 46
66
votes
12 answers

How can I find the version of an installed Perl module?

How do you find the version of an installed Perl module? This is in an answer down at the bottom, but I figure it important enough to live up here. With these suggestions, I create a function in my .bashrc function perlmodver { perl -M$1 -e…
Drew Stephens
  • 17,207
  • 15
  • 66
  • 82
50
votes
5 answers

How do I automate CPAN configuration?

The first time you run cpan from the command line, you are prompted for answers to various questions. How do you automate cpan and install modules non-interactively from the beginning?
runrig
  • 6,486
  • 2
  • 27
  • 44
46
votes
3 answers

How do I install CPAN modules while using perlbrew?

I have started using perlbrew and installed perl-5.12.2. I understand I need to re-install my CPAN modules, so I switched to my new Perl version (perlbrew switch perl-5.12.2 and hash -r), verified the switch was successful (perl -v) then tried…
David B
  • 29,258
  • 50
  • 133
  • 186
45
votes
3 answers

How can I install Perl modules without root privileges?

I am on a Linux machine where I have no root privileges. I want to install some packages through CPAN into my home directory so that when I run Perl, it will be able to see it. I ran cpan, which asked for some coniguration options. It asked for some…
petersohn
  • 11,292
  • 13
  • 61
  • 98
32
votes
10 answers

How do YOU manage Perl modules when using a package manager?

A recent question here on SO got me thinking. On most Linux distributions that I tried, some Perl modules would be available through the package manager. Others, of course, not. For quite a while I would use my package manager whenever I needed to…
innaM
  • 47,505
  • 4
  • 67
  • 87
1
2 3
80 81