Skip to content

Puppet module for installing Perlbrew and optionally a Perlbrew-ed Perl and CPAN modules

License

Notifications You must be signed in to change notification settings

walkamongus/perlbrew

Repository files navigation

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:

class {'perlbrew::perl': }

Install a different customized Perl version using Perlbrew:

class {'perlbrew::perl':
  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

About

Puppet module for installing Perlbrew and optionally a Perlbrew-ed Perl and CPAN modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •