Forge Home

cpanm

Manage perl modules with cpanminus

899 downloads

899 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
released Mar 8th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-cpanm', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-cpanm
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-cpanm --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: perl, cpan, cpanm

Documentation

puppet/cpanm — version 1.0.0 Mar 8th 2024

cpanm

CI Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores AGPL v3 License Donated by

Table of Contents

  1. Description
  2. Setup - The basics of getting started with cpanm
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

The cpanm module manages CPAN packages using the cpanminus package. It exists to provide a simple way to install CPAN modules with the option to not run test suites. The intent is that it should work with Debianish and Redhatty distributions.

The module provides a class cpanm which will install Perl components, gcc, make and cpanminus itself. It also provides a resource type cpanm which you can use to manage modules in more or less the same way as package works.

Setup

What cpanm affects

This module will install the following packages unless manage_dependencies is set to false:

  • perl
  • gcc
  • make
  • perl-core on RHEL7

It will also install cpanm itself in a standard directory, generally /usr/bin or /usr/local/bin.

Setup Requirements

This module uses curl to download the cpanminus installer.

Beginning with cpanm

include cpanm

cpanm {'CGI':
  ensure => latest,
}

Usage

Both the cpanm class and resource support a mirror parameter to control which CPAN archive packages are fetched from. The cpanm resource supports additional parameters, test and force, to enable CPAN tests and force CPAN installation respectively.

Limitations

The listing of installed CPAN modules is based on perldoc perllocal. This generally works well, but doesn't get updated when you remove a CPAN module.

Development

This module is maintained by Vox Pupuli. Vox Pupuli welcomes new contributions to this module, especially those that include documentation and rspec tests. We are happy to provide guidance if necessary.

Please see CONTRIBUTING for more details.

Please log tickets and issues on github.

Transfer Notice

This module was originally authored by James McDonald james@jamesmcdonald.com. The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead.

Previously: https://github.com/jamesmcdonald/puppet-cpanm