Forge Home

perl

Perl Module

10,375 downloads

10,375 latest version

4.1 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
released Aug 1st 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'fatmcgav-perl', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fatmcgav-perl
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fatmcgav-perl --version 0.1.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

Documentation

fatmcgav/perl — version 0.1.0 Aug 1st 2013

Perl installation and configuration module

This module installs the Perl programming language package, and provides a definition for loading and excluding Perl modules available on CPAN.

Note: Perl modules are highly variable in their implementation, because "there's more than one way to do it", so some modules will have to be installed some other way. Though this module should give some idea on suitable code patterns that could get it done.

Requirements

Updated code tested on Redhat family. Original code only tested on Ubuntu 12.04 LTS, should work for other Debian distributions. Should not require any other packages installed.

Using the perl class

The perl class ensures that the Perl language is installed with some minimal tools required to manage Perl and CPAN modules.

Default Perl install

This should install the perl, perl-CPAN, pm-tools and the Apps::pmuninstall module with the default settings.

include ::perl

I reccomend you at least specify a CPAN mirror.

Installing with parameters

class{'::perl':
    perl_version => '5.8.6',
    ensure       => present,
    cpan_mirror  => 'ftp://some.mirror.cpan.org/pub/perl/CPAN/',
}

Parameters

  • perl_version: Specifies the Perl version to install, defaults to the default version for your Linux distribution.
  • ensure: Passed to the packages being installed, 'present' is default.
  • cpan_mirror: Select your CPAN mirrod, ftp://mirror.bytemark.co.uk/CPAN/ is the default. Change this if you're not in the UK.
  • perl_package: Specifies the Perl package to be installed, the default is 'perl'
  • cpan_package: Specifies the Perl CPAN package to be installed, the default is 'perl-CPAN'
  • pmtools_package: Specifies the Perl management tools package to be installed, defaults to 'pmtools'.

Using the perl::cpan resource definition

Install a Perl module from CPAN:

perl::cpan{'module::name': ensure => present}

Ensure that a Perl module is not installed:

perl::cpan{'module::name': ensure => absent}

Parameters

  • ensure: Ensure that the module is 'present' or 'absent', defaults to present.
  • env: Specify an environemt to execute the install command in, defaults to undef.
  • force: Should the module be forcibly installed, defaults to false.
  • timeout: Changes the timeout in seconds for installing the Perl module, some modules can take a quite some time to compile. By default it is set to 120 seconds.

To do...

  • Change the CPAN definition to a case format for handling exceptional packages, broken package, and obsolete packages.
  • Create some facter scripts for Perl, such as getting version and reporting CPAN mirror

Credits

Code modified by Gavin Williams (fatmcgav@gmail.com).
Original code written by Aaron Hicks (hicksa@landcareresearch.co.nz) for the New Zealand eScience Infrastructure.

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License