++ed by:

1 PAUSE user

Author image Steffen Schwigon
and 1 contributors


bootstrap-perl - Bootstrap Perl inclusive CPAN from git


Install a threaded 64bit Perl using current "blead" from git with CPAN config into a path like /opt/perl-5.15-thread-64bit-v5.15.5-258-ge7d0a3f:

  $ bootstrap-perl [ <OPTIONS> ]

Specify git revisions

latest "blead"

  $ bootstrap-perl --version blead  # same as default


  # note the different tag forms before and after Perl 5.10

  $ bootstrap-perl --version perl-5.8.7
  $ bootstrap-perl --version v5.14.1

branch name

  $ bootstrap-perl --version remotes/origin/smoke-me/cpan
  $ bootstrap-perl --version remotes/origin/zefram/pad_api
  $ bootstrap-perl --version remotes/origin/maint-5.12
  $ bootstrap-perl --version remotes/origin/maint-5.12^
  $ bootstrap-perl --version remotes/origin/maint-5.12~3

by commit id

  $ bootstrap-perl --version c14f2f9db08de3f50fe2ff7438429153d6ceb9a5
  $ bootstrap-perl --version c14f2f9db08de3f50fe2ff7438429153d6ceb9a5^

Installation options

install directory

Install into other install directory than the unified naming schema (see below for more on this schema):

  $ bootstrap-perl --prefix <PREFIX>

Use the unified naming schema but not under /opt:

  $ bootstrap-perl --prefixbase /foo/bar

install build dependencies

Provide the distro for which to install known build dependencies, like gcc, git, make, etc.:

 $ bootstrap-perl --installdeps=debian

Currently there is only one: debian. Simply send me a patch for your preferred distro, it's easy.

parallel build

Use this many parallel jobs to build:

  $ bootstrap-perl --jobs <n>
  $ bootstrap-perl -j <n>

Default is to use core count + 1.


Run the perl test suite:

  $ bootstrap-perl --test
  $ bootstrap-perl -t

Default is not to run the tests.

use threads

Build a threaded Perl (-Dusethreads):

  $ bootstrap-perl --usethreads

which is already the default. To build non-threaded Perl use:

  $ bootstrap-perl --nousethreads

use 64bit

Build a 64bit enabled Perl (-Duse64bitall):

  $ bootstrap-perl --use64bit

which is already the default. To build Perl without 64bit use:

  $ bootstrap-perl --nouse64bit

version numbers vs. blead

By default the Perl version number is derived from git-describe and kept for later reference (e.g., for codespeed exe name). However, if you specify

  $ bootstrap-perl --blead

then the version used in paths or codespeed executables is using "blead" in order to generate a make it belong to to a common development line besides the yearly segmented graphs.

It is only possible to use --blead with development versions in order to create consistent results from only the blead branch.

Note that --blead does not set a version but only modifies the formats of path prefix and how the version is reported to Perl::Formance; it is not the same as --version blead.

configure CPAN and modules

Configure CPAN to use these mirrors:

  $ bootstrap-perl --mirror file:///home/ss5/MINICPAN/
  $ bootstrap-perl -m file:///home/ss5/MINICPAN/ -m ftp://ftp.rub.de/pub/CPAN/
  $ bootstrap-perl -m file:///home/ss5/MINICPAN/,ftp://ftp.rub.de/pub/CPAN/

(Option can be repeated and allow comma separated lists.)

Install these modules from CPAN:

  $ bootstrap-perl --module YAML::Syck
  $ bootstrap-perl -M YAML::Syck -M Digest::SHA1 -M IO::Tty -M LWP
  $ bootstrap-perl -M YAML::Syck,Digest::SHA1 -M IO::Tty,LWP

(Option can be repeated and allow comma separated lists.)

run scripts

Run these scripts relative to built <PREFIX>/bin/:

  $ bootstrap-perl --run tapper-testsuite-benchmark-perlformance
  $ bootstrap-perl --run tapper-testsuite-benchmark-perlformance --runargs="--plugins=Fib,FibOO;-vvv"
  $ bootstrap-perl -r tapper-testsuite-benchmark-perlformance -r primes.pl

(Option --run can be repeated and allows comma separated lists.)

(Option --runargs can be repeated and allows semicolon[sic] separated lists.)

run Perl::Formance benchmarks

To do everything in one go needed for running Benchmark::Perl::Formance do:

  $ bootstrap-perl --perlformance

This sets defaults equivalent to for -M Digest::SHA1,DB_File,Mail::DKIM,IP::Country,Net::Ident,IO::Socket::INET6,Encode::Detect,Benchmark::Perl::Formance,Task::PerlFormance,Tapper::TestSuite::Benchmark::Perl::Formance -m http://perlformance.net/PINTO/perlformance/ --run benchmark-perlformance --runargs=--plugins=ALL.

You can override parts of that like this:

  $ bootstrap-perl --perlformance --runargs="--plugins=Fib,FibOO"

to specify different set ob benchmarks.

Unified installation prefix schema

It uses a unified naming schema for it's installation PREFIX:


which leads to paths like this:


This naming schema consist of the major version, basic configuration and git-describe.

Meta info utilities

To easily provide the raw git-describe two scripts are is put inside each install


which prints the git-describe of that installation.

Another script


is put inside each install which prints a so called "executable name" for this built perl used on a codespeed instance like http://speed.perlformance.net. Although this is unlikely to be useful for others it is always created.

These two utility scripts could be derived from the install prefix but also work when you provided your own prefix.


The script bootstrap-perl bootstraps Perl installations with complete CPAN environment, inclusive distroprefs, from git.

It was originally developed to be used by Benchmark::Perl::Formance and now lives on its own.

It should work for Perl versions from 5.8.6 to blead. Occasionally it cherry-picks a very few patches to fix some known build issues, like for 5.8.x.


Steffen Schwigon <ss5@renormalist.net>


This software is copyright (c) 2012 by Steffen Schwigon.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.