LinuxmacOS

Where Does Perlbrew Store Perl Builds and Libraries?

Perlbrew keeps Perl builds and libraries under a perl5 directory in your home folder.

Last updated

Perlbrew roots everything at ~/perl5. Interpreter builds, library sets, and metadata organize underneath, with a bin directory for shims. Switching versions adjusts the shell environment, not files.

That layout makes the shell init snippet load-bearing. Without sourcing it, the system Perl shadows everything. Keep the init line in profile files and reinstall rather than copy across machines.

Where Perlbrew stores this, by platform

Linux
~/perl5/perlbrew

Interpreter builds and libraries under perl5. Shell init snippet activates versions. Rebuild on new machines instead of copying binaries.

macOS
~/perl5/perlbrew

Same layout on Mac. System Perl stays untouched beside it. Init snippet belongs in shell profile files.

Frequently asked questions

How do I move Perlbrew to a new machine?

Reinstall perlbrew and rebuild the same Perl versions fresh. Compiled Perls rarely survive copying between machines. Library lists reinstall from cpanfile afterwards.

Perlbrew versus local::lib directories?

They nest by design. Perlbrew manages interpreter builds while local::lib directories hold per-version libraries. Both live under perl5 with distinct roles.

Notice an outdated path? Let us know.