gugod/App-perlbrew — pull request #333 by salva (2013-05-23 16:26:35+00:00)
Title: allow to install several perl variations on one single command

Besides having different perl versions installed, it is sometimes useful to have the same perl compiled with different flags (i.e. usethread, use64bitint, uselongdouble, etc.).

As the number of perls required may increases exponentially with the number of flags, doing it by hand can be a very boring and error prone task.

The current patch set, adds support for a new flag ('both') into the install command that makes it compile two perls, one with the given flag set and the other with out. 'both' can be used more than one time in the same command invocation.

For instance, the command...

perlbrew install --both thread --both 64int --both ld --both debug perl-5.18.0

will build and install the following perls:

perl-5.18.0
perl-5.18.0-64int
perl-5.18.0-64int-debug
perl-5.18.0-64int-ld
perl-5.18.0-64int-ld-debug
perl-5.18.0-debug
perl-5.18.0-ld
perl-5.18.0-ld-debug
perl-5.18.0-thread-multi
perl-5.18.0-thread-multi-64int
perl-5.18.0-thread-multi-64int-debug
perl-5.18.0-thread-multi-64int-ld
perl-5.18.0-thread-multi-64int-ld-debug
perl-5.18.0-thread-multi-debug
perl-5.18.0-thread-multi-ld
perl-5.18.0-thread-multi-ld-debug

The patch also adds support for using "multi", "64int", "64all", "ld" and "debug" as simple flags and renames "threads" to "thread" for consistency (though "threads" is still accepted).

The patch may be further improved but at this point I would appreciate having some feedback about the possibilities of getting it in.