|
NAMEperlbrew - Perl environment manager.SYNOPSISperlbrew command syntax:perlbrew <command> [options] [arguments] Commands: init Initialize perlbrew environment. info Show useful information about the perlbrew installation install Install perl uninstall Uninstall the given installation available List perls available to install lib Manage local::lib directories. alias Give perl installations a new name upgrade-perl Upgrade the current perl list List perl installations use Use the specified perl in current shell off Turn off perlbrew in current shell switch Permanently use the specified perl as default switch-off Permanently turn off perlbrew (revert to system perl) exec exec programs with specified perl environments. clone-modules re-installs all CPAN modules from one installation to another self-install Install perlbrew itself under PERLBREW_ROOT/bin self-upgrade Upgrade perlbrew itself. install-patchperl Install patchperl install-cpanm Install cpanm, a friendly companion. install-multiple Install multiple versions and flavors of perl download Download the specified perl distribution tarball. clean Purge tarballs and build directories version Display version help Read more detailed instructions Generic command options: -q --quiet Be quiet on informative output message. -v --verbose Tell me more about it. See `perlbrew help` for the full documentation of perlbrew, or See `perlbrew help <command>` for detail description of the command. CONFIGURATION
COMMAND: INITUsage: perlbrew initThe "init" command should be manually invoked whenever you (the perlbrew user) upgrade or reinstall perlbrew. If the upgrade is done with "self-upgrade" command, or by running the one-line installer manually, this command is invoked automatically. COMMAND: INFO
COMMAND: INSTALLUsage: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] http://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 "perlbrew available", a path to a pre-downloaded tarball, a path to a git-checkout of perl5 repo, or a URL to a tarball. The format of <perl-release> looks like:
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. The prefix "cperl" is a special release provided not by perl5 porters, but from the community. The cperl distributions are downloaded from: https://github.com/perl11/cperl/releases See http://perl11.org/cperl/ for more information about cperl distribution. Options for "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. ex. C<perlbrew install perl-5.10.1 -D usemymalloc -U versiononly> --destdir $path Install perl as per 'make install DESTDIR=$path' --sitecustomize $filename Specify a file to be installed as sitecustomize.pl --mirror $URL Specify a CPAN-mirror URL. The default value of this is "https://www.cpan.org" By default, all installations are configured after their name like this: sh Configure -de -Dprefix=$PERLBREW_ROOT/perls/<name> COMMAND: INSTALL-MULTIPLEUsage: perlbrew install-multiple [options] <perl-version-1> <perl-version-2> ...Build and install the given versions of perl. "install-multiple" accepts the same set of options as the command "install" plus the following ones: --both $flavor Where $flavor is one of C<thread>, C<multi>, C<ld>, C<64int>, C<64all>, C<debug> and C<clang>. For every given perl version, install two flavors, one with the flag C<--$flavor> set and the other with out. C<--both> can be passed multiple times with different values and in that case, all the possible combinations are generated. --common-variations equivalent to C<--both thread --both ld --both 64int> --all-variations generates all the possible flavor combinations --append $string Appends the given string to the generated names For instance: perlbrew install-multiple 5.18.0 blead --both thread --both debug Installs the following perls: perl-blead perl-blead-debug perl-blead-thread-multi perl-blead-thread-multi-debug perl-5.18.0 perl-5.18.0-debug perl-5.18.0-thread-multi perl-5.18.0-thread-multi-debug (note that the "multi" flavor is selected automatically because "thread" requires it) Another example using custom compilation flags: perlbrew install-multiple 5.18.0 --both thread -Doptimize='-O3' --append='-O3' COMMAND: UNINSTALLUsage: perlbrew uninstall <name>Uninstalls the given perl installation. The name is the installation name as in the output of `perlbrew list`. This effectively deletes the specified perl installation, and all libs associated with it. COMMAND: USEUsage: perlbrew use [perl-<version> | <version> | <name>]Use the given version perl in current shell. This will not effect newly opened shells. Without a parameter, shows the version of perl currently in use. COMMAND: SWITCHUsage: perlbrew switch [ <name> ]Switch to the given version, and makes it the default for this and all future terminal sessions. Without a parameter, shows the version of perl currently selected. COMMAND: LISTUsage: perlbrew listList all perl installations inside perlbrew root specified by $PERLBREW_ROOT environment variable. By default, the value is "~/perl5/perlbrew". If there are libs associated to some perl installations, they will be included as part of the name. The output items in this list can be the argument in various other commands. COMMAND: AVAILABLEUsage: perlbrew available [--all]List the recently available versions of perl on CPAN. The list is retrieved from the web page <http://www.cpan.org/src/README.html>, and is not the list of *all* perl versions ever released in the past. To get a list of all perls ever released, use the "--all" option. NOTICE: This command might be gone in the future and become an option of 'list' command. COMMAND: OFFUsage: perlbrew offTemporarily 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). COMMAND: SWITCH-OFFUsage: perlbrew switch-offPermananently disable perlbrew. Use "switch" command to re-enable it. Invoke "use" command to enable it only in the current shell. Re-enables the default system Perl, whatever that is. COMMAND: ALIASUsage: 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. COMMAND: EXECUsage: perlbrew exec [options] <command> <args...>Options for "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 "--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. COMMAND: ENVUsage: perlbrew env [ <name> ]Low-level command. Invoke this command to see the list of environment variables that are set by "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`. COMMAND: SYMLINK-EXECUTABLESUsage: perlbrew symlink-executables [ <name> ]Low-level command. This command is used to create the "perl" executable symbolic link to, say, "perl5.13.6". This is only required for development version of perls. You don't need to do this unless you have been using old perlbrew to install perls, and you find yourself confused because the perl that you just installed appears to be missing after invoking `use` or `switch`. perlbrew changes its installation layout since version 0.11, which generates symlinks to executables in a better way. If you just upgraded perlbrew (from 0.11 or earlier versions) and "perlbrew switch" failed to work after you switch to a development release of perl, say, perl-5.13.6, run this command: perlbrew symlink-executables perl-5.13.6 This essentially creates this symlink: ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl -> ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl5.13.6 Newly installed perls, whether they are development versions or not, does not need manually treatment with this command. COMMAND: INSTALL-CPANMUsage: perlbrew install-cpanmInstall the "cpanm" standalone executable in "$PERLBREW_ROOT/bin". For more rationale about the existence of this command, read <http://perlbrew.pl/Perlbrew-and-Friends.html> COMMAND: INSTALL-PATCHPERLUsage: perlbrew install-patchperlInstall the "patchperl" standalone executable in "$PERLBREW_ROOT/bin". This is automatically invoked if your perlbrew installation is done with the installer, but not with cpan. For more rationale about the existence of this command, read <http://perlbrew.pl/Perlbrew-and-Friends.html> COMMAND: SELF-UPGRADEUsage: perlbrew self-upgradeThis command upgrades Perlbrew to its latest version. COMMAND: SELF-INSTALLUsage: perlbrew self-installNOTICE: You should not need to run this command in your daily routine. This command installs perlbrew itself to "$PERLBREW_ROOT/bin". It is intended to be used by the perlbrew installer. However, you could manually do the following to re-install only the "perlbrew" executable: curl https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew -o perlbrew perl ./perlbrew self-install It is slightly different from running the perlbrew installer because "patchperl" is not installed in this case. COMMAND: CLEANUsage: perlbrew cleanRemoves all previously downloaded Perl tarballs and build directories. COMMAND: VERSIONUsage: perlbrew versionShow the version of perlbrew. COMMAND: LIBUsage: perlbrew lib <action> <lib-name>perlbrew lib list perlbrew lib create <lib-name> perlbrew lib delete <lib-name> The `lib` command is used to manipulate local::lib roots inside perl installations. Effectively it is similar to `perl -Mlocal::lib=/path/to/lib-name`, but a little bit more than just that. A lib name can be a short name, containing alphanumeric, like 'awesome', or a full name, prefixed by a perl installation name and a '@' sign, for example, 'perl-5.14.2@awesome'. Here are some a brief examples to invoke the `lib` command: # Create lib perl-5.12.3@shizuka perlbrew lib create perl-5.12.3@shizuka # Create lib perl-5.14.2@nobita and perl-5.14.2@shizuka perlbrew use perl-5.14.2 perlbrew lib create nobita perlbrew lib create shizuka # See the list of use/switch targets perlbrew list # Activate a lib in current shell perlbrew use perl-5.12.3@shizuka perlbrew use perl-5.14.2@nobita perlbrew use perl-5.14.2@shizuka # Activate a lib as default perlbrew switch perl-5.12.3@shizuka perlbrew switch perl-5.14.2@nobita perlbrew switch perl-5.14.2@shizuka # Delete lib perl-5.14.2@nobita and perl-5.14.2@shizuka perlbrew use perl-5.14.2 perlbrew lib delete nobita perlbrew lib delete shizuka # Delete lib perl-5.12.3@shizuka perlbrew lib delete perl-5.12.3@shizuka Short lib names are local to current perl. A lib name 'nobita' can refer to 'perl-5.12.3@nobita' or 'perl-5.14.2@nobita', whichever is activated in the current shell. When "use"ing or "switch"ing to a lib, always provide the long name. A simple rule: the argument to "use" or "switch" command should appear in the output of "perlbrew list". COMMAND: UPGRADE-PERLUsage: perlbrew upgrade-perlRunning this command upgrades the currently activated perl to its latest released brothers. If you have a shell with 5.32.0 activated, it upgrades it to 5.32.1. Minor Perl releases (ex. 5.x.*) are binary compatible with one another, so this command offers you the ability to upgrade older perlbrew environments in place. COMMAND: DOWNLOADUsage: perlbrew download <perl-release>Examples: perlbrew download perl-5.14.2 perlbrew download perl-5.16.1 perlbrew download perl-5.17.3 Download the specified version of perl distribution tarball under the directory "$PERLBREW_ROOT/dists/". The argument "perl-release" should be one of the items from "perlbrew available" command. COMMAND: LIST-MODULESUsage: perlbrew list-modulesList all installed cpan modules for the current perl. This command can be used in conjunction with `perlbrew exec` to migrate your module installation to different perl. The following command re-installs all modules under perl-5.16.0: perlbrew list-modules | perlbrew exec --with perl-5.16.0 cpanm Note that this installs the latest versions of the Perl modules on the new perl, which are not necessarily the same module versions you had installed previously. COMMAND: CLONE-MODULESUsage:perlbrew clone-modules [options] <destination> perlbrew clone-modules [options] <source> <destination> Options: --notest Skip all module tests This command re-installs all CPAN modules found from one installation to another. For example, this list all modules under '5.26.1' and re-install them under '5.27.7': perlbrew clone-modules 5.26.1 5.27.7 The argument "source" is optional and is default to the current activated one. However if none is activated (perlbrew is switched off), it it an error. Noted that this does not guarantee that the versions of modules stays the same in the destination. SEE ALSOApp::perlbrew, App::cpanminus, Devel::PatchPerl
Visit the GSP FreeBSD Man Page Interface. |