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
6
votes
2 answers

How to install multiple perl modules at once using CPAN

Is it possible to install multiple modules using CPAN? I've tried: perl -MCPAN -e 'install DBIx::Transaction File::Basename::Object' but I get this error: Can't locate object method "Transaction" via package "DBIx" at -e line 1
tvs
  • 737
  • 2
  • 17
  • 33
6
votes
3 answers

How do I install deps for CPAN module without installing it?

This is a follow-up to my previous question about developing Perl applications. Let’s say I develop an application as a CPAN module using Module::Install. Now I upload the code to the production server, say using a git push, and I would like to…
zoul
  • 102,279
  • 44
  • 260
  • 354
6
votes
1 answer

CPAN thinks an outdated module is up to date

$ sudo cpanm Heap::Priority Heap::Priority is up to date. (0.01) The current version is 0.11. I'm new to CPAN so I'm getting really frustrated. What's wrong and how do I fix it? Thanks.
user1484613
6
votes
6 answers

CPAN shell runs out of memory. How can I give it more memory on Unix?

I'm getting an Out of memory! message for all installs. I've never used cpan before and I'm not really sure how it works. I did a ulimit on the /.cpan directory and it resulted in unlimited. Here's what I'm looking at: [/usr/bin]# perl -MCPAN -e…
pnkflydgr
  • 665
  • 3
  • 13
  • 22
5
votes
2 answers

Installing Perl Modules on Android OS

Are there an options to install Perl modules like LWP on Android (on SL4A environment ). Also, are there prepackaged Perl modules that can be installed on Android, and is there an option to see which modules are installed using the Android Debug…
smith
  • 3,232
  • 26
  • 55
5
votes
4 answers

Perl & CPAN upgrade help for OS X

Here is my problem. I am running OS X v10.7 (Lion) and want to set up an old Perl program I have written (was then using a Windows System with ActivePerl and then its ppm). I read to use CPAN to install Perl modules (I am trying to install the Graph…
jjNford
  • 5,170
  • 7
  • 40
  • 64
5
votes
3 answers

Will all perl versions support older modules?

I'm have Perl 5.8 installed on all of our servers and wanted to use the DBI and DBD::Oracle modules to access our databases. My main concern is with the newer versions of perl the DBI and DBD modules will stop working with 5.8. Then I'd have to…
krizzo
  • 1,823
  • 5
  • 30
  • 52
5
votes
1 answer

converting html to text with perl

I have a bunch of html files and need to convert and format them to text with perl i.e somthing like
will be interperted to \n I found this perl module on cpan html::formattext it format the text well but if there is link it strip it , are…
smith
  • 3,232
  • 26
  • 55
5
votes
5 answers

automatically install missing modules from CPAN

If I want to distribute a Perl script, what is the best way to painlessly install any required modules that are missing on the user's system? Extra credit if there is a way to even install/upgrade Perl itself if it is missing or "too old".
JoelFan
  • 37,465
  • 35
  • 132
  • 205
5
votes
2 answers

Install & update a Perl module as "universal" (x86_64, arm64)?

Is is possible to install and update Perl (CPAN) modules with universal (x86_64, arm64) architecture support? If yes, then how? background On an arm-based macOS computer, a Perl CPAN module can be installed for exactly one designated architecture as…
marc-medley
  • 8,931
  • 5
  • 60
  • 66
5
votes
5 answers

Is there a CPAN module for converting seconds to English?

Is there a CPAN module that can convert a number of seconds to a human-readable English description of the interval? secToEng( 125 ); # => 2 min 5 sec secToEng( 129_600 ); # => 1 day 12 h The format isn't important as long as it's human-readable. I…
Tim
  • 13,904
  • 10
  • 69
  • 101
5
votes
2 answers

How can I follow a particular CPAN module's updates?

I subscribe to the CPAN weekly update mailing list but it reports on every module updated in the past week. Instead, I would like to subscribe to particular modules and get only their updates. I want to "follow" that module for the purposes of…
Dale Forester
  • 18,145
  • 10
  • 27
  • 27
5
votes
1 answer

Non Perl files that need to be installed with CPAN distribution?

I need to have files installed with my CPAN dist that aren't Perl. Where in the dist should I put them? and what's the best way to reference them from within a module so that I have access to them regardless of users configuration?
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
5
votes
2 answers

DPAN to create local CPAN

I want to make a CPAN repository from all curently installed modules. So I used autobundle to get a list of installed modules. I then used BackPAN::Index to download all the distributions into a directory and then ran dpan in it. It chew them for…
jira
  • 3,890
  • 3
  • 22
  • 32
5
votes
1 answer

How to specify external library file locations when installing CPAN modules

I'm trying to get Perl's Finance::Quote module working after MacOS upgrade to 11.4. One of the dependencies is B::Keywords. B::Keywords installation fails a test with this error: > sudo cpan B::Keywords [...] Can't open…
psiz
  • 69
  • 5