Forge Home

perlbrew

Install and configure perlbrew, perl, and CPAN modules

11,846 downloads

11,078 latest version

4.4 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

  • 0.2.2 (latest)
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Sep 22nd 2014
This version is compatible with:

Start using this module

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

Add this module to your Puppetfile:

mod 'walkamongus-perlbrew', '0.2.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add walkamongus-perlbrew
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install walkamongus-perlbrew --version 0.2.2

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, perlbrew, cpan

Documentation

walkamongus/perlbrew — version 0.2.2 Sep 22nd 2014

perlbrew Puppet Module

Build Status

Table of Contents

  1. Overview
  2. Module Description
  3. Setup - The basics of getting started with perlbrew
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.

Overview

This module installs and configures Perlbrew. It also includes optional classes to install Perl and CPAN modules via Perlbew.

Module Description

This module primarily focuses on installing and configuring Perlbrew. There are optional classes that may be declared for installing a spcific version of Perl as well as installing CPAN modules for a Perl installed with Perlbrew.

Perlbrew configuration is currently limited. Perl compile-time options may be passed to the perlbrew::perl class.

Using the perlbrew:perl class will automatically install the Bundle::LWP and Crypt::SSLeay modules if they are not present on the system. This enables the installation of CPAN modules from HTTPS mirrors.

CPAN module installation is done via a dynamically generated cpanfile.

Setup

What perlbrew affects

  • Packages
    • curl
  • Files
    • perlbrew root directory
    • cpanfile
  • Execs
    • perlbrew installation
    • perl installation
    • switch to perl version
    • cpan installation
    • Bundle::LWP and Crypt::SSLeay installation
    • additional cpan module installation

Beginning with perlbrew

Install and configure Perlbrew with defaults:

include ::perlbrew

Usage

Install Perlbrew to a custom directory:

class {'::perlbrew':
  perlbrew_root => '/usr/local/perlbrew',
}

Install default Perl version 5.16.3:

perlbrew::perl {'my_perl_install': }

Install a different customized Perl version using Perlbrew:

perlbrew::perl {'my_perl_install':
  version         => '5.12.3',
  compile_options => [
    '-Duseshrplib',
    '-Dusethreads',
  ],
}

Install a CPAN module:

perlbrew::cpan::module {'Class::DBI': }

Install a CPAN module with custom install options:

perlbrew::cpan::module {'Class::C3': }
class {'perlbrew::cpan::install':
  options => [
    '--mirror ftp://cpan.cse.msu.edu/',
    '--notest',
    '--force',
  ],
}

Reference

###Parameters

perlbrew

  • perlbrew_root: perlbrew installation root directory. Defaults to '/opt/perl5'
  • perlbrew_init_file: file to hold required perlbrew ENV variables. This file should be sourced by users on login. Defaults to '/etc/profile.d/perlbrew.sh'

perlbrew::perl

  • version: perl version string to install via perlbrew. Should be recognizeable by perlbrew. Defaults to '5.16.3'
  • compile_options: Array of perlbrew options that get passed to the perlbrew perl installation command. Defaults to empty array

perlbrew::cpan::install

  • cpanfile_dir: Directory in which the cpanfile is placed. Defaults to '/tmp'
  • options: Array of options passed to the cpan command for module installation. The '--installdeps' option is always passed in order to install from the cpanfile.

perlbrew::cpan::module

  • version: Version string or range for the module to install. See Version_Formats for more information.

###Classes

  • perlbrew::params
  • perlbrew::init
  • perlbrew::install
  • perlbrew::config
  • perlbrew::perl
  • perlbrew::cpan::install
  • perlbrew::cpan::module

Limitations

Developed using:

  • Puppet 3.6.2
  • CentOS 6.5