App-perlbrew
view release on metacpan or search on metacpan
script/perlbrew view on Meta::CPAN
In some cases, say, your home directory is on NFS and shared across multiple
machines, you may wish to have several different perlbrew setting
per-machine. To do so, you can use the C<PERLBREW_HOME> environment variable to
tell perlbrew where to look for the initialization file. Here's a brief bash
snippet for the given scenario.
if [ "$(hostname)" == "machine-a" ]; then
export PERLBREW_HOME=~/.perlbrew-a
elif [ "$(hostname)" == "machine-b" ]; then
export PERLBREW_HOME=~/.perlbrew-b
fi
source ~/perl5/perlbrew/etc/bashrc
=item PERLBREW_CONFIGURE_FLAGS
This environment variable specify the list of command like flags to pass through
to 'sh Configure'. By default it is '-de'.
=item PERLBREW_CPAN_MIRROR
The CPAN mirror url of your choice. By default, "https://cpan.metacpan.org" is used.
=back
=head1 COMMAND: INIT
Usage: perlbrew init
The C<init> command should be manually invoked whenever you (the perlbrew user)
upgrade or reinstall perlbrew.
If the upgrade is done with C<self-upgrade> command, or by running the
one-line installer manually, this command is invoked automatically.
=head1 COMMAND: INFO
=over 4
=item B<info> [module]
Usage: perlbrew info [ <module> ]
Display useful information about the perlbrew installation.
If a module is given the version and location of the module is displayed.
=back
=head1 COMMAND: INSTALL
Usage:
perlbrew install [options] <perl-release>
perlbrew install [options] /path/to/perl-5.14.0.tar.gz
perlbrew install [options] /path/to/perl/git/checkout/dir
perlbrew install [options] https://example.com/mirror/perl-5.12.3.tar.gz
Build and install the wanted perl. The last argument can be a short string designating a specific version which can be known from the output of C<perlbrew available>, a path to a pre-downloaded tarball, a path to a git-checkout of perl5 repo, or a UR...
The format of <perl-release> looks like:
=over 4
=item perl-<version>
=item perl-stable
=item perl-blead
=item <version>
=item stable
=item blead
=back
Version numbers usually look like "5.x.xx", or "perl-5.xx.x-RCx" for
release candidates.
Version "stable" is a special token that means whatever the latest
stable version is at the moment.
Version "blead" is also a special token that means whatever the latest
version in the repository, which is downloaded from this specific URL
regardless of mirror settings:
https://github.com/Perl/perl5/archive/blead.tar.gz
The specified perl is downloaded from the official CPAN website or from the
mirror site configured before.
Version number alone without the "perl-" prefix means the official
release provided by perl5 porters.
Options for C<install> command:
-f --force Force installation
-j $n Parallel building and testing. ex. C<perlbrew install -j 5 perl-5.14.2>
-n --notest Skip testing
--switch Automatically switch to this Perl once successfully
installed, as if with `perlbrew switch <version>`
--as Install the given version of perl by a name.
ex. C<perlbrew install perl-5.6.2 --as legacy-perl>
--noman Skip installation of manpages
--thread Build perl with usethreads enabled
--multi Build perl with usemultiplicity enabled
--64int Build perl with use64bitint enabled
--64all Build perl with use64bitall enabled
--ld Build perl with uselongdouble enabled
--debug Build perl with DEBUGGING enabled
--clang Build perl using the clang compiler
--no-patchperl
Skip calling patchperl
-D,-U,-A Switches passed to perl Configure script.
script/perlbrew view on Meta::CPAN
Usage: perlbrew available [--all]
List the recently available versions of perl on CPAN.
By default, the latest sub-version of each stable versions are listed.
To get a list of all perls ever released, inculding development and RC versions, run the command with C<--all> option.
=head1 COMMAND: OFF
Usage: perlbrew off
Temporarily disable perlbrew in the current shell. Effectively re-enables the
default system Perl, whatever that is.
This command works only if you add the statement of `source $PERLBREW_ROOT/etc/bashrc`
in your shell initialization (bashrc / zshrc).
=head1 COMMAND: SWITCH-OFF
Usage: perlbrew switch-off
Permananently disable perlbrew. Use C<switch> command to re-enable it. Invoke
C<use> command to enable it only in the current shell.
Re-enables the default system Perl, whatever that is.
=head1 COMMAND: ALIAS
Usage: perlbrew alias [-f] create <name> <alias>
Create an alias for the installation named <name>.
Usage: perlbrew alias [-f] rename <old_alias> <new_alias>
Rename the alias to a new name.
Usage: perlbrew alias delete <alias>
Delete the given alias.
=head1 COMMAND: EXEC
Usage: perlbrew exec [options] <command> <args...>
Options for C<exec> command:
--with perl-version,... - only use these versions
--min n.nnnnn - minimum perl version
(format is the same as in 'use 5.012')
--max n.nnnnn - maximum perl version
--halt-on-error - stop on first nonzero exit status
Execute command for each perl installations, one by one.
For example, run a Hello program:
perlbrew exec perl -e 'print "Hello from $]\n"'
The output looks like this:
perl-5.12.2
==========
Hello word from perl-5.012002
perl-5.13.10
==========
Hello word from perl-5.013010
perl-5.14.0
==========
Hello word from perl-5.014000
Notice that the command is not executed in parallel.
When C<--with> argument is provided, the command will be only executed with the
specified perl installations. The following command install Moose module into
perl-5.12, regardless the current perl:
perlbrew exec --with perl-5.12 cpanm Moose
Multiple installation names can be provided:
perlbrew exec --with perl-5.12,perl-5.12-debug,perl-5.14.2 cpanm Moo
They are split by either spaces or commas. When spaces are used, it is required
to quote the whole specification as one argument, but then commas can be used in
the installation names:
perlbrew exec --with '5.12 5.12,debug 5.14.2@nobita @shizuka' cpanm Moo
As demonstrated above, "perl-" prefix can be omitted, and lib names can be
specified too. Lib names can appear without a perl installation name, in such
cases it is assumed to be "current perl".
At the moment, any specified names that fails to be resolved as a real
installation names are silently ignored in the output. Also, the command exit
status are not populated back.
=head1 COMMAND: ENV
Usage: perlbrew env [ <name> ]
Low-level command. Invoke this command to see the list of environment
variables that are set by C<perlbrew> itself for shell integration.
The output is something similar to this (if your shell is bash/zsh):
export PERLBREW_ROOT=/Users/gugod/perl5/perlbrew
export PERLBREW_VERSION=0.31
export PERLBREW_PATH=/Users/gugod/perl5/perlbrew/bin:/Users/gugod/perl5/perlbrew/perls/current/bin
export PERLBREW_PERL=perl-5.14.1
tcsh / csh users should see 'setenv' statements instead of `export`.
=head1 COMMAND: SYMLINK-EXECUTABLES
Usage: perlbrew symlink-executables [ <name> ]
Low-level command. This command is used to create the C<perl> executable
( run in 0.913 second using v1.01-cache-2.11-cpan-39bf76dae61 )