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
32
votes
5 answers

How do I find the module dependencies of my Perl script?

I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules?…
zoul
  • 102,279
  • 44
  • 260
  • 354
28
votes
6 answers

How do I choose a package name for a custom Perl module that does not collide with builtin or CPAN packages names?

I have read the perldoc on modules, but I don't see a recommendation on naming a package so it won't collide with builtin or CPAN module/package names. In the past, to develop a local Session.pm module, I have created a local directory using my…
Marcus
  • 5,772
  • 8
  • 35
  • 60
28
votes
2 answers

What is the difference between cpan and cpanm?

What is the difference between the cpan and cpanm commands? They both seem to install perl modules, so what is the difference?
CJ7
  • 22,579
  • 65
  • 193
  • 321
28
votes
11 answers

How can I use a new Perl module without install permissions?

Here is my situation: I know almost nothing about Perl but it is the only language available on a porting machine. I only have permissions to write in my local work area and not the Perl install location. I need to use the Parallel::ForkManager Perl…
Jeroen Dirks
  • 7,705
  • 12
  • 50
  • 70
27
votes
18 answers

What are some good Perl debugging methods?

Are there other ways for debugging Perl programs apart from Data::Dumper and perl -d?
joe
  • 34,529
  • 29
  • 100
  • 137
26
votes
6 answers

Uninstall all perl modules installed by cpan

Yesterday I wanted to test some software and in the documentation it said, to install I just needed to type cpan -i Software I never used cpan, I just know that it is the perl package manager. (Is it..?) However, it turned out that I needed loads…
janoliver
  • 7,744
  • 14
  • 60
  • 103
24
votes
11 answers

Why do you not use CPAN modules?

ETA: When I ask "Why do you not use CPAN modules?", I am referring to the people who refuse to use any CPAN modules (including high quality ones like DBI). Not all CPAN code is of high quality, and it is fine to stay away from modules that are…
Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
24
votes
3 answers

Where does CPAN install modules?

I can't find an authoritative/comprehensive description of where CPAN installs its files. I assume there must be a set of rules and that it's not as simple as "XYZ directory" because, for example, multiple users on a Linux box can run CPAN even…
Stephen
  • 8,508
  • 12
  • 56
  • 96
24
votes
4 answers

How do I get started writing a module for CPAN?

Right now, I have my own homegrown testing harness/directory structure/support doc strucure/distribution tools for my libraries. However, reading the blog post Write your code like it's going on CPAN, it sounded like a good idea. Then it occurred…
Robert P
  • 15,707
  • 10
  • 68
  • 112
21
votes
11 answers

How can I extract URL and link text from HTML in Perl?

I previously asked how to do this in Groovy. However, now I'm rewriting my app in Perl because of all the CPAN libraries. If the page contained these links: Google Apple The…
anon
21
votes
9 answers

The future of Perl? (Perl 6, employability)

I've found a few related questions, like Python vs. Perl (now deleted) and Is Perl Worth it? (now deleted), but I can't seem to find anything that directly addresses this question. Is there a legitimate future in Perl? I work in a Perl shop right…
NateDSaint
  • 1,524
  • 2
  • 16
  • 35
20
votes
10 answers

How can I install Perl module without using CPAN.pm?

Is it possible?
lamcro
  • 6,069
  • 18
  • 57
  • 70
20
votes
8 answers

"Fatal error: 'EXTERN.h' file not found" while installing Perl modules

While trying to install Perl modules like JSON::XS or YAML::XS, i receive the same error: XS.xs:1:10: fatal error: 'EXTERN.h' file not found I use MacBook, xCode is up to date, everything else that could help is up to date too.
Yehor Levchenko
  • 56
  • 1
  • 2
  • 10
20
votes
4 answers

What are some code coverage tools for Perl?

Are there any good (and preferably free) code coverage tools out there for Perl?
Kurt W. Leucht
  • 4,725
  • 8
  • 33
  • 45
20
votes
19 answers

What constitutes effective Perl training for non-Perl developers?

I've been working with Perl long enough that many of its idiosyncracies have become second nature to me. When new programmers join our group, they frequently have little to no experience with Perl, and it's usually my task to train them (to the…
Adam Bellaire
  • 108,003
  • 19
  • 148
  • 163
1
2
3
80 81