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

Installing Perl modules to a specific location

I have several Linux machines that run Perl programs and other programs and tools. I want to keep all tools between machines synchronized, so I have shared the /usr/local directory between one machine (Main) and the others. Now I would like to keep…
user44697
  • 313
  • 4
  • 11
5
votes
5 answers

How can I generate URL slugs in Perl?

Web frameworks such as Rails and Django has built-in support for "slugs" which are used to generate readable and SEO-friendly URLs: Slugs in Rails Slugs in Django A slug string typically contains only of the characters a-z, 0-9 and - and can hence…
knorv
  • 49,059
  • 74
  • 210
  • 294
5
votes
3 answers

mingw64 shell perl CPAN does not work for any module

$ perl -MCPAN -e 'install XML::Simple' Reading '/u/.cpan/Metadata' Database was generated on Fri, 14 Oct 2016 19:29:02 GMT Running install for module 'XML::Simple' Checksum for /u/.cpan/sources/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz…
Amit Mahajan
  • 895
  • 6
  • 34
5
votes
2 answers

What is the correct way to add a utility module to a CPAN distribution?

I would like to factor out some of the stuff in Crypt::SSLeay's Makefile.PL into a couple of separate classes. These classes would only be used by Makefile.PL. As such, I do want them not to be indexed by the PAUSE indexer not to be installed as…
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
5
votes
2 answers

How can I revert to the previous Perl setup after installing Bundle::CPAN?

After installation of latest Bundle::CPAN, I realized that certain legacy code will not run in this latest version. I wish to remove (and not just unlink) this latest version and revert back to using the old version. How can I do that?
SkypeMeSM
  • 3,197
  • 8
  • 43
  • 61
5
votes
3 answers

How do I make pQuery work with slightly malformed HTML?

pQuery is a pragmatic port of the jQuery JavaScript framework to Perl which can be used for screen scraping. pQuery quite sensitive to malformed HTML. Consider the following example: use pQuery; my $html_malformed =…
knorv
  • 49,059
  • 74
  • 210
  • 294
5
votes
4 answers

How can I implement a simple IRC client in Perl?

I'm working on a tool that needs to send IRC messages to an internal IRC channel. This isn't a constantly running program, but rather a tool that will be invoked occasionally and needs to be able to notify the channel with a couple of messages when…
mpeters
  • 4,737
  • 3
  • 27
  • 41
5
votes
2 answers

Perl: cpan force install not working in single command

I want to force install a perl module. When I do this, the installation succeeds: cpan shell -- CPAN exploration and modules installation (v2.00) Enter 'h' for help. cpan[1]> force install Net::DNS::SEC But when I do this, it fails: root@ubuntu:~#…
Randomly Named User
  • 1,889
  • 7
  • 27
  • 47
5
votes
1 answer

How to make CPAN Testers load a development release of a prerequisite?

I recently uploaded development releases of two distributions to CPAN where one depended on the other. Let's say one distro is named Distro, the other Prereq, and Distro requires Prereq version 0.009_001. Unfortunately, I didn't get any test reports…
nwellnhof
  • 32,319
  • 7
  • 89
  • 113
5
votes
2 answers

Perl Compilation Error: "Can't locate local/lib.pm"

As a Perl rookie, I have made a rookie mistake. I was working on a project that required an HTML parser so I thought I'd install Perl's HTML::TreeBuilder::XPath module, so I dove into cpan and perlbrew without a full understanding of how they work.…
James
  • 117
  • 1
  • 1
  • 10
5
votes
2 answers

Need more examples on how to use Spreadsheet::ParseExcel

I have been using the Spreadsheet::ParseExcel to list the contents of spreadsheet. I've seen several examples on how to dump the entire spreadsheet. I really would like to see how to use this script more selectively. The example below from IBM…
XL.
  • 1,390
  • 4
  • 11
  • 13
5
votes
3 answers

Parse and display MIME multipart email on website

I have a raw email, (MIME multipart), and I want to display this on a website (e.g. in an iframe, with tabs for the HTML part and the plain text part, etc.). Are there any CPAN modules or Template::Toolkit plugins that I can use to help me achieve…
aidan
  • 9,310
  • 8
  • 68
  • 82
5
votes
3 answers

Perl Class::Accessor failure, trivial example - why?

Can someone tell me why the main does not find the methods generated by Class::Accessor in this very small and trivial example ? These few lines of code fail with perl codesnippets/accessor.pl Can't locate object method "color" via package…
Alex F
  • 826
  • 8
  • 18
5
votes
1 answer

What's the fastest way to get CRUD over CGI on a database handle in Perl?

TL;DR: Want to write CGI::CRUD::Simple (a minimalist interface module for CGI::CRUD), but I want to check first if i overlooked a module that already does that. I usually work with applications that don't have the niceties of having frameworks and…
Mithaldu
  • 2,393
  • 19
  • 39
5
votes
3 answers

What's a good Perl OO interface for creating and sending email?

I'm looking for a simple (OO?) approach to email creation and sending. Something like $e = Email->new(to => "test ", from => "from…
aidan
  • 9,310
  • 8
  • 68
  • 82