NAME

PPRVM::Config - Config module used by PPRVM

VERSION

Version 0.01

SYNOPSIS

PPRVM::Config is used to structure the PPRVM config and build sane defaults.

my $config = PPRVM::Config->new(
    rootdir => '.pprvm',
)

SUBROUTINES/METHODS

rootdir

The root of the whole PPRVM directory structure. Defaults to $ENV{HOME}

ruby_version

The exact ruby version (e.g. ruby-1.9.2-p180). Defaults to 'latest'.

rubygems_version

The exact rubygems version. Defaults to 'latest'.

pprvmrc

The file containing the shell paths and environment variables. Defaults to '~/.pprvm/var/pprvmrc' if root_dir and dirs are default.

This file should be sourced in the users .bashrc.

dirs

A hashref defining the directories under root_dir. Defaults to:

{
    bin => 'bin',
    source => 'source',
    var => 'var',
    gemsets => 'gemsets',
    rubies => 'rubies',

}

installed_db

A simple textfile with a list of installed ruby versions.

download_db

A hashref containing information on download urls and archive type of the ruby and rubygems versions. Example:

---
latest_ruby:
  archtype: tgz
  dir: ruby-1.9.2-p180
  file: ruby-1.9.2-p180.tar.gz
  url: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
latest_rubygems:
  archtype: tgz
  dir: rubygems-1.6.2
  file: rubygems-1.6.2.tgz
  url: http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz

db_file

The yml file the download_db is generated from.

path_map

A hashref containing shortcuts to most config options and paths. The path are build from config and are absolute.

Those options are:

Root dir $config->root

Ruby version after resolution of 'latest' $config->real_version

File with installed versions $config->installed_db

File with available versions $config->db_file

Environment variables and PATH $config->pprvmrc

Path to binaries $config->path

$config->ruby_dest
$config->ruby_src
$config->ruby_url
$config->ruby_archive
$config->gem_dir
$config->rubygems_src
$config->rubygems_archive
$config->rubygems_url

bootstrap_only

AUTHOR

Mugen Kenichi, <mugen.kenichi at uninets.eu>

BUGS

Report bugs at:

SUPPORT

  • Technical support

    <mugen.kenichi at uninets.eu>