Search code examples
linuxperlinstallationmultiple-versions

How can I install a newer Perl without damaging the system install?


I have seen plenty of people mention some of the cool new features in Perl >= 5.12 but my preferred flavor of Linux Ubuntu only comes with 5.10.1.

I have no fear of PPAs and I know how to google (unless someone finds me something, then I'll feel sheepish). I cannot find someone that provides a Perl PPA; I thought there was a PPA for everything!

My further fear is that since linux-based OSes use perl as part of their packaging and other systems I don't necessarily want to venture out on my own to compile/install it for fear of breaking my OS.

Can someone give me some guidance on the easiest while still safest way to upgrade/parallel-install the newest Perl versions?

  • Can I specify multiple binaries in a good way to not affect system utilities?
  • How do the Modules work if multiple versions of Perl are installed?

Solution

  • I'd recommend taking a look at the excellent perlbrew, available from CPAN, which allows you to locally install and manage multiple perl versions.