PERLBREW(1)

πŸ“¦
version 1.01 Β· 3 versions
, in fedora 43

πŸ’– PERLBREW β€” the Perl environment manager, bestie edition πŸ’–

okay so. perlbrew is your Perl environment manager, and honestly? she's that girl. she installs perls, switches between them, keeps them all tidy in their own lil corner, and never once makes you sudo anything into your system perl. main character energy fr. this is PERLBREW(1) from the User Contributed Perl Documentation, and we're gonna walk through the whole thing together, no skips, no cap. 🫢


✨ NAME ✨

perlbrew β€” Perl environment manager. that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

here's the command syntax, bestie:

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           Execute programs with specified perl environments.

list-modules   List installed CPAN modules for the current Perl version in use
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-cpm        Install cpm, a faster but still 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, aka the lil guys that work everywhere:

-q --quiet     Be quiet on informative output message.
-v --verbose   Tell me more about it.

and then:

See perlbrew help for the full documentation of perlbrew, or

See perlbrew help <command> for detail description of the command.

like. just ask her, she'll tell you. πŸ’œ


πŸŽ€ CONFIGURATION πŸŽ€

PERLBREW_ROOT

so by default, perlbrew builds and installs perls into the "$ENV{HOME}/perl5/perlbrew" directory. want a different spot? set this environment variable in your "bashrc" to the directory in your shell RC before sourcing perlbrew's RC. order matters, bestie, don't skip that step. πŸ¦‹

and here's the cute part: it's possible to share one perlbrew root with multiple user accounts on the same machine. therefore people do not have to install the same version of perl over an over. (iconic, honestly.) let's say "/opt/perl5" is the directory we want to share. all users should be able append this snippet to their bashrc to make it effective:

export PERLBREW_ROOT=/opt/perl5
source ${PERLBREW_ROOT}/etc/bashrc

after doing so, everyone's PATH should include "/opt/perl5/bin" and "/opt/perl5/perls/${PERLBREW_PERL}/bin". each user can invoke "perlbrew switch" and "perlbrew use" to independently switch to different perl environment of their choice. however β€” and this is the part where you pay attention β€” only the user with write permission to $PERLBREW_ROOT may install CPAN modules. this is both good and bad depending on the working convention of your team. no notes, that's just how it is. 😭

if you wish to install CPAN modules only for yourself, you should use the "lib" command to construct a personal local::lib environment. local::lib environments are personal, and are not shared between different users. for more detail, read "perlbrew help lib" and the documentation of local::lib.

if you want even a cooler module isolation and wish to install CPAN modules used for just one project, you should use carton for this purpose. project-level isolation? obsessed. ✨

it is also possible to set this variable before installing perlbrew to make perlbrew install itself under the given PERLBREW_ROOT:

export PERLBREW_ROOT=/opt/perl5
curl -L https://install.perlbrew.pl | bash

after doing this, the perlbrew executable is installed as "/opt/perl5/bin/perlbrew".


PERLBREW_HOME

by default, perlbrew stores per-user setting to the "$ENV{HOME}/.perlbrew" directory. to use a different directory, set this environment variable in your shell RC before sourcing perlbrew's RC. (yes, same rule as before. before. sourcing. πŸ’…)

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 "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

per-machine vibes. we love a girl who knows which box she's on. 🌈


PERLBREW_CONFIGURE_FLAGS

this environment variable specify the list of command like flags to pass through to 'sh Configure'. by default it is '-de'.


PERLBREW_CPAN_MIRROR

the CPAN mirror url of your choice. by default, "https://cpan.metacpan.org" is used. pick your fave, she doesn't mind. πŸ“


πŸ”₯ COMMAND: INIT πŸ”₯

Usage: perlbrew init

the "init" command should be manually invoked whenever you (the perlbrew user) upgrade or reinstall perlbrew. like, whenever you change her outfit, you gotta let her know. πŸ‘‘

if the upgrade is done with "self-upgrade" command, or by running the one-line installer manually, this command is invoked automatically. so it's handled for you in those cases β€” no extra work, slay.


πŸ¦‹ COMMAND: INFO πŸ¦‹

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. so like, perlbrew info Some::Module and boom, version + where it lives. handy. πŸ’–


πŸ’… 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 "perlbrew available", a path to a pre-downloaded tarball, a path to a git-checkout of perl5 repo, or a URL to a tarball. so many ways to feed her, pick your fave. πŸŽ€

the format of <perl-release> looks like:

perl-<version>
perl-stable
perl-blead
<version>
stable
blead

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. noted. 🫑

Options for "install" command:

  • -f, --force β€” Force installation
  • -j $n β€” Parallel building and testing. ex. 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. 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. 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-MULTIPLE ⭐

Usage: perlbrew install-multiple [options] <perl-version-1> <perl-version-2> ...

build and install the given versions of perl. (yes, plural. she's efficient like that. πŸ‘‘)

"install-multiple" accepts the same set of options as the command "install" plus the following ones:

  • --both $flavor β€” Where $flavor is one of thread, multi, ld, 64int, 64all, debug and clang. For every given perl version, install two flavors, one with the flag --$flavor set and the other with out. --both can be passed multiple times with different values and in that case, all the possible combinations are generated.
  • --common-variations β€” equivalent to --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'

look at all those perls. a whole lil family. πŸ˜­πŸ’–


πŸ’€ COMMAND: UNINSTALL πŸ’€

Usage: 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.

ok bestie, real talk β€” this deletes the perl installation and all the libs that go with it. it's not a soft delete, there's no recycling bin. be sure before you hit enter. 🫣

🌸 COMMAND: USE 🌸

Usage: perlbrew use [perl-<version> | <version> | <name>]

use the given version perl in current shell. this will not effect newly opened shells. so it's a right now, just this terminal kinda deal. your other windows are unbothered, living their truth.

without a parameter, shows the version of perl currently in use.


🌈 COMMAND: SWITCH 🌈

Usage: perlbrew switch [ <name> ]

switch to the given version, and makes it the default for this and all future terminal sessions. permanent commitment energy, but the good kind. πŸ’

without a parameter, shows the version of perl currently selected.

πŸ¦‹ COMMAND: LIST πŸ¦‹

perlbrew list

Okay so this one is your inventory check bestie. It lists, like, every single perl installation chillin' inside the perlbrew root β€” and that root is whatever $PERLBREW_ROOT says it is. If you never set it, the default is ~/perl5/perlbrew. πŸ’…

And here's the cute part: if some of those perl installations have libs attached to them? Those libs show up as part of the name. So the items you see in this list? They're literally valid arguments for a bunch of the other commands. Reuse queen. ♻️


✨ COMMAND: AVAILABLE ✨

perlbrew available [--all]

This is your window shopping command β€” it lists the recently available versions of perl on CPAN. πŸ›οΈ

By default you get the latest sub-version of each stable version. That's the low-key, no-drama list.

Wanna see EVERY PERL EVER RELEASED? Development versions, RC versions, all of it? Then run it with the --all option and buckle up. 😭


πŸ’€ COMMAND: OFF πŸ’€

perlbrew off

Temporarily disables perlbrew in the current shell. That's it. It just... steps aside and re-enables the default system Perl, whatever that happens to be on your machine. No commitment, no permanence, just a lil break. 🫢

Heads up bestie: this only works if you've added source $PERLBREW_ROOT/etc/bashrc to your shell initialization (your bashrc / zshrc). No bashrc line, no off switch. πŸ’”

πŸŽ€ COMMAND: SWITCH-OFF πŸŽ€

perlbrew switch-off

Okay so this is the PERMANENT version of off. Permanently disables perlbrew. Fr fr, it's off-off. 😳

  • Wanna turn it back on for good? Use the switch command.
  • Wanna turn it on for just this one shell? Use the use command.

Either way, it re-enables the default system Perl, whatever that is.


πŸ‘‘ COMMAND: ALIAS πŸ‘‘

perlbrew alias [-f] create <name> <alias>

Creates an alias for the installation named <name>. Nicknames for your perls, iconic. πŸ’…

perlbrew alias [-f] rename <old_alias> <new_alias>

Renames the alias to a new name. Glow-up complete. ✨

perlbrew alias delete <alias>

Deletes the given alias. We don't talk about them anymore. πŸͺ¦


πŸ”₯ COMMAND: EXEC πŸ”₯

perlbrew exec [options] <command> <args...>

Options for the exec command:

  • --with perl-version,... β€” only use these versions, bestie
  • --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 πŸ›‘

It executes your command for each perl installation, one by one. Like a lil parade of perls. 🎠

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. One at a time, no cutting the line. πŸšΆβ€β™€οΈ

When the --with argument is provided, the command will only be executed with the specified perl installations. So this installs the Moose module into perl-5.12, regardless of whatever the current perl is:

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 get split by either spaces or commas. When you use spaces, you have to quote the whole specification as one argument β€” but then, plot twist, commas can be used inside the installation names:

perlbrew exec --with '5.12 5.12,debug 5.14.2@nobita @shizuka' cpanm Moo

As demonstrated above, the perl- prefix can be omitted, and lib names can be specified too. Lib names can even appear without a perl installation name β€” in those cases it's assumed to be the current perl.

Okay, real talk, two caveats: at the moment, any specified names that fail to be resolved as real installation names are silently ignored in the output (no error, no drama, just gone πŸ™ˆ). Also, the command exit statuses are not populated back. So don't come for exec's exit code, it's not there.

🌸 COMMAND: ENV 🌸

perlbrew env [ <name> ]

Low-level command, iykyk. Invoke this 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. Different shell, different vibe. 🐚


perlbrew symlink-executables [ <name> ]

Low-level command again. This one creates the perl executable symbolic link to, say, perl5.13.6. This is only required for development version perls.

You genuinely don't need to do this unless you've been using old perlbrew to install perls, and you find yourself confused because the perl you just installed appears to be missing after invoking use or switch. Not you being gaslit by your own filesystem. 😭 perlbrew changed 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, do not need manual treatment with this command. So like, don't just do it for fun. 🫢


πŸ“ COMMAND: INSTALL-CPANM πŸ“

perlbrew install-cpanm

Installs the cpanm standalone executable in $PERLBREW_ROOT/bin. Chef's kiss, one command, cpanm acquired. πŸ‘©β€πŸ³πŸ’‹

For more rationale about the existence of this command, read https://perlbrew.pl/Perlbrew-and-Friends.html

perlbrew install-cpm

Installs the cpm standalone executable in $PERLBREW_ROOT/bin. Same energy, different tool. ⚑


🌈 COMMAND: INSTALL-PATCHPERL 🌈

perlbrew install-patchperl

Installs 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. Rude, but that's the rule.

For more rationale about the existence of this command, read https://perlbrew.pl/Perlbrew-and-Friends.html


⭐ COMMAND: SELF-UPGRADE ⭐

perlbrew self-upgrade

This command upgrades Perlbrew to its latest version. Glow-up, but for software. πŸ’…βœ¨


🫢 COMMAND: SELF-INSTALL 🫢

perlbrew self-install
NOTICE: You should not need to run this command in your daily routine. Like, genuinely, put it down bestie. πŸ™ˆ

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's slightly different from running the perlbrew installer because patchperl is not installed in this case. Trade-offs, babes. πŸ€·β€β™€οΈ


🧚 COMMAND: CLEAN 🧚

perlbrew clean

Removes all previously downloaded Perl tarballs and build directories. Digital declutter, so satisfying, so therapeutic. 🧹✨


πŸ’– COMMAND: VERSION πŸ’–

perlbrew version

Show the version of perlbrew. Short, sweet, iconic, no notes. πŸ‘‘


πŸŽ€ COMMAND: LIB πŸŽ€

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's similar to perl -Mlocal::lib=/path/to/lib-name, but it's a little bit more than just that. It's giving ✨extra✨.

A lib name can be a short name, containing alphanumeric characters, 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 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 the current perl. A lib name like nobita can refer to perl-5.12.3@nobita or perl-5.14.2@nobita β€” whichever one is activated in the current shell. So it's like, context-dependent, main character energy. πŸ’…

When you're useing or switching to a lib, always provide the long name. Simple rule, no exceptions: the argument to the use or switch command should appear in the output of perlbrew list. If it's not in the list, don't pass it. Periodt. 🎯


πŸ”₯ COMMAND: UPGRADE-PERL πŸ”₯

perlbrew upgrade-perl

Running this command upgrades the currently activated perl to its latest released brothers. So if you have a shell with 5.32.0 activated, it upgrades it to 5.32.1. Sibling upgrade, cute. πŸ‘―

Minor Perl releases (ex. 5.x.*) are binary compatible with one another, which is exactly why this command can offer you the ability to upgrade older perlbrew environments in place. No nuking, no reinstalling, just a lil glow-up in position. ✨


🌸 COMMAND: DOWNLOAD 🌸

perlbrew download <perl-release>

Examples:

perlbrew download perl-5.14.2
perlbrew download perl-5.16.1
perlbrew download perl-5.17.3

Downloads the specified version of the perl distribution tarball into the directory $PERLBREW_ROOT/dists/. Just the tarball though, no installing, we're only collecting. πŸ›οΈ

The argument perl-release should be one of the items from the perlbrew available command. So go window-shop first, then come back. πŸ‘€


πŸ’œ COMMAND: LIST-MODULES πŸ’œ

perlbrew list-modules

Lists all installed cpan modules for the current perl. Your module receipt. 🧾

This command can be used in conjunction with perlbrew exec to migrate your module installation to a 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. So it's a vibe transfer, not a perfect clone. 🫠

πŸ¦‹ COMMAND: CLONE-MODULES πŸ¦‹

perlbrew clone-modules [options] <destination>
perlbrew clone-modules [options] <source> <destination>

Options:

  • --notest β€” Skip all module tests. Speed run, no safety net. πŸƒβ€β™€οΈπŸ’¨

This command re-installs all CPAN modules found from one installation to another. For example, this lists all modules under 5.26.1 and re-installs them under 5.27.7:

perlbrew clone-modules 5.26.1 5.27.7

The argument source is optional and defaults to the currently activated one. However β€” if none is activated (perlbrew is switched off), it is an error. So switch something on first, bestie. 😀

Note that this does not guarantee that the versions of modules stay the same in the destination. Same modules, not necessarily same versions. Manifesting consistency is not the same as guaranteeing it. πŸ’«

πŸ›  COMMAND: MAKE-SHIM

Usage, bestie:

perlbrew make-shim <program>
perlbrew make-shim -o <shim-name> <program>
perlbrew make-shim --output <shim-name> <program>

Okay so what this does is it produces an executable file in your current directory named program β€” or shim-name if you handed one over after --output (or the short version, -o). And what comes out is a shell-wrapper β€” a shim β€” of the named program as it lives inside your current perlbrew environment. ✨

The way it works: when you run the shim, the original program gets executed with all the relevant environment variables set to the perlbrew environment it was installed in β€” no matter which perlbrew environment is currently activated. And because it's just a lil file, you can move the shim into other directories, like the very conventional ~/.local/bin, so it's always there for you. 🫢

Real talk, here's a scenario. Say you find tldr from App::tldr and you're like "this is a handy tool, I'm obsessed" and you decide to install it inside your daily working environment:

perlbrew use perl-5.36.1
cpm install -g App::tldr

But then you occasionally have to switch to a different environment, and PATH gets tweaked, and suddenly the command tldr has gone missing β€” and that's the expected outcome, unfortunately:

perlbrew use perl-5.18.4
tldr perl  #=> error: command not found

😭 Not the command not found.

It would be nice if tldr could be made universally available, right? One way to mitigate such needs is to prepare to install the tldr program outside of PERLBREW_ROOT, while still using a perlbrew environment to run it.

So like β€” for example β€” you make yourself a conventional directory ~/.local/bin and put that in PATH, then:

perlbrew use perl-5.36.1

cd /tmp
perlbrew make-shim tldr
mv /tmp/tldr ~/.local/bin/tldr

And boom. That ~/.local/bin/tldr is now a shell-wrapper of the actual tldr program, and internally it activates the perlbrew environment perl-5.36.1. Running the tldr shim will then always run the actual tldr, no matter which perlbrew environment is activated β€” or even if perlbrew is turned off entirely. πŸ’…

The only requirement is that the perlbrew environment perl-5.36.1 and the installation of App::tldr both have to remain. No environment, no shim magic. Periodt.

πŸ“¦ COMMAND: MAKE-PP

Usage:

perlbrew make-pp -i <path> -o <path>
perlbrew make-pp --input <path> --output <path>

This command takes a path to a perl program (that's the input), and produces a PAR-packed version of that program at the specified path (that's the output). Essentially it's a wrapper of pp from PAR::Packer, hence the name. πŸŽ€

Now, important: this requires your current perlbrew environment to have PAR and PAR::Packer installed first. Otherwise make-pp bails out. πŸƒβ™€οΈ And on top of that β€” if the current perl is not a perlbrew-managed perl, or if the given output path is already occupied, make-pp also bails out. Triple check, no exceptions.

The produced file is a standalone binary executable containing all of this content:

  1. The input perl program
  2. perl runtime
  3. all core perl libs of current perl
  4. the entire site lib
  5. the entire local lib (managed by the perlbrew lib command), if active.

It's expected that the executable can then be run on a different machine of the same OS and arch. πŸ¦‹

Noted: this approach is the maximum overkill for packing one program, because it'll definitely be packing a lot more than the exact list of runtime dependencies of the named program. make-pp is meant for a lazy solution to a non-trivial problem β€” that problem being perfectly determining the runtime dependencies of an arbitrary program. πŸ’€

πŸ‘€ SEE ALSO

  • App::perlbrew
  • App::cpanminus
  • Devel::PatchPerl

And that's a wrap on PERLBREW(1), bestie!! πŸŽ€ This page is from perl v5.42.0, dated 2025-07-25, and you literally read the whole thing so you're officially the main character of your terminal rn. Go install something iconic. βœ¨πŸ‘‘πŸ’–

πŸ“¦ where this page comes from