Skip to content
rhaen edited this page Feb 18, 2013 · 18 revisions

The Class Rewrite of puppet-perlbrew

There is a desperate need for a solid class model for the perlbrew module. Here are some design ideas how things might look like. Parameters for classes/defines are written in italics.

The structure of the rewrite

class perlbrew::init inherits perlbrew::params

Provides basic initalisation for the module

  • Installs perlbrew script including init
  • Installs cpanminus script
  • Creates user if desired, which will own the files (default: root)
  • Creates group if desired, which will own the files (default: root)
  • Installs the needed packages (build-essential, or RHEL stuff)

class perlbrew::params

Provides the basic configuration parameters

  • $perlbrew_root - The directory for the perl interpreters
  • $perlbrew_bin - The location of the perlbrew script
  • $cpanm_bin - The location of cpanminus
  • $cpanm_url - The URL where to download cpanm
  • $perlbrew_user - The user which owns the files
  • $perlbrew_group - The group which owns the files
  • $perlbrew_addons - Additional packages which might be helpful
  • $perl_buildparams - Parameters which specify the build of the Perl interpreter

define perlbrew::build import perlbrew::params

Builds the Perl interpreter of your choice

  • $version - The version of the interpreter which should be built

define perlbrew::module import perlbrew::params

Installs a CPAN module using cpanminus

  • $name - The name of the module which should be installed
Clone this wiki locally