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
8
votes
1 answer

Perl Inline::Python module, how to put code into a string

I am learning perl Inline::Python library. In the example of cpan website, we have print "9 + 16 = ", add(9, 16), "\n"; print "9 - 16 = ", subtract(9, 16), "\n"; use Inline Python => <<'END_OF_PYTHON_CODE'; def add(x,y): return x…
biajee
  • 565
  • 1
  • 4
  • 20
8
votes
6 answers

How can I install CPAN modules locally without root access (DynaLoader.pm line 229 error)?

Doesn't work with other modules, but to give an example. I installed Text::CSV_XS with a CPAN setting: 'makepl_arg' => q[PREFIX=~/lib], When I try running a test.pl script: $ perl test.pl #!/usr/bin/perl use lib…
Tomasz
  • 5,269
  • 8
  • 56
  • 65
8
votes
1 answer

What is the difference between module and distribution on CPAN?

I was just comparing the numbers if different "Archive Networks", like CPAN, CTAN, rubygems.org etc. CPAN displays two very different numbers: 105,774 modules 24,657 distributions As I'm not a Perl programmer (I'm just preparing a talk for…
Florian Pilz
  • 8,002
  • 4
  • 22
  • 30
7
votes
2 answers

What does Perl do when two versions of a module are installed?

I don't have root access on a remote box I'm working with, so I'm using a combination of cpanm and local::lib as described here to install CPAN modules to my local directory on the box. Using cpanm, I assume cpanm Module::To::Update would install…
gempesaw
  • 329
  • 3
  • 12
7
votes
2 answers

Do all my perl module .pm files need a `$VERSION` definition?

I just added a new file to the PDL::IO::Touchstone distribution and noticed that CPAN's indexer says version is undef since $VERSION is missing: module : PDL::IO::MDIF version: undef in file:…
KJ7LNW
  • 1,437
  • 5
  • 11
7
votes
1 answer

Writing a modular aggregator and normalizer in Perl

I've just entered into an environment where I am much more free to choose whatever approach I want for a project (meaning full access to the CPAN and no module-approval-by-committee), but I'm a little out of touch with the new hotnesses, so I…
Flowchartsman
  • 371
  • 2
  • 13
7
votes
2 answers

perl ".../config.h, needed by `Makefile'" not working after OSX Lion upgrade

SOLVED. See at bottom. Just upgraded to OSX Lion and trying to get my Perl install running again: sudo /usr/bin/perl -MCPAN -e 'install "MODULENAME"' with any value of MODULENAME that I tried (e.g. JSON) produces: ... Checking if your kit is…
Johannes Ernst
  • 3,072
  • 3
  • 42
  • 56
7
votes
4 answers

how do I install perl modules on macos?

The thread perl how can I append STDOUT of list form system call of perl script to a file led to the following solution: use IPC::Run qw( run );. On my macos 10.14.6 running perl 5.18.4, this threw an error: Can't locate IPC/Run.pm in @INC (you may…
Jacob Wegelin
  • 1,304
  • 11
  • 16
7
votes
1 answer

cpan error: Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work

ActiveState Perl - 5.26 on Windows 10 - 64 bit. When I am trying to launch cpan from CMD - I see the following error: C:\Users\orenm>cpan Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES…
Oren Maurer
  • 179
  • 2
  • 6
7
votes
2 answers

Why should I not update all my CPAN modules?

I thought it would be a good idea in general to update all software on my computer regularly. Since CPAN modules are not managed by my package manager I figured I should do cpan -u every once in a while. It was only after executing this that I read…
J. Doe
  • 326
  • 2
  • 12
7
votes
1 answer

Is this Canary::Stability rant a legitimate concern?

I was installing new CPAN modules today, and it turns out that the JSON::XS module displays its own warning/rant about using it with Perls over 5.22. It seems the author got fed up with backward-incompatible changes allegedly introduced into Perl…
Stephen
  • 8,508
  • 12
  • 56
  • 96
7
votes
1 answer

XSLT2.0 processor for Perl?

Is there any robust XSLT2.0 processor for Perl? I just tried out XML::LibXSLT and it doesn't support analyze-string, regex, etc. I'm afraid of using XML::Saxon::XSLT2 for my work cause it uses Java and I wouldn't want to add that to my list of…
Gaurav Dadhania
  • 5,167
  • 8
  • 42
  • 61
7
votes
1 answer

How to tell CPAN (Perl) about packages created with meta-programming?

I have several CPAN modules that make extensive use of meta-programming to cut down on boiler-plate and to ease refactoring. The consequence of this however is that there are many packages that get created programmatically, thus there is never a…
Eric Strom
  • 39,821
  • 2
  • 80
  • 152
7
votes
2 answers

Where can I find a concise guide to converting an existing CPAN module to use Dist::Zilla?

I have read, at various times, both the documentation and a number of blog posts on Dist::Zilla. I have never felt confidence in my understanding of it. In response to another question, @Ether raised the possibility of converting Crypt-SSLeay to use…
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
7
votes
3 answers

How do I install a CPAN module site-wide while local::lib is present?

I've recently set up a new system and wanted to install Padre to check it out. The Padre install instructions specifically said to install local::lib, so I did so (although I've never had need of it before). I then went on my way installing…
Dave Sherohman
  • 45,363
  • 14
  • 64
  • 102