There are several Perl distributions that you might choose, and each of them exists to serve a different audience. No one distribution is the right answer for you, and I can’t tell you which one to use without knowing about your situation and what’s important to you. Your possible solutions range from compiling, installing, and maintaining everything yourself to paying a support company to provide you with a compiled perl
and pre-compiled modules for easy installation.
In each of these major options, I include some advantages and disadvantages for each. However, you must decide for yourself how important each of those are. Some may have fewer bullet points, but those few bullets points out-weight the much longer list of advantages in other distributions.
In short, each option trades between time and money. The more work you do yourself, the more time you spend on it yourself, but you can do whatever you like. Spending money on the problem frees up your time, but may given you fewer deployment options. That balance is different for different people.
Original Perl source
Everyone should compile their own perl
at least once in their lives, just to see how it’s done and to understand what is involved (Item 110. Compile and install your own perls.). This does require a C compiler, most likely some version of gcc
, but once you have the compiler, you can use it for many other things once you have installed perl
, including modules from CPAN.
You get the Perl source from CPAN, which has links to the latest releases and past releases of perl
, along with simple instructions to compile and install the code (much like we told you in Item 110. Both of those sets of instructions use the default configuration options, but when you can compile yourself you can control all of the options.
If you haven’t done this before, you should try it a couple of times (once to make all the mistakes, another to do it right from step one) to see how much work it is so you can make a better decision about letting someone compile perl
for you.
Advantages
- You can install it wherever you like.
- You can choose the particular compilation options.
Disadvantages
- You need a compiler, which may hard to bootstrap if your system doesn’t come with one.
- You might get a different binary from an earlier compilation, which might matter if you need everything exactly the same.
- You have to support it yourself.
System packages
Many systems come with a native package manager and a list of packages that you can install. These typically handle dependencies for you, and usually anything that you install through the package manager works with anything else you install through the package manager. If you have multiple machines on which you must install exactly the same thing, it’s very easy for you to replicate that with packages.
For this convenience, you lose the ability to minutely control how you compile the source and where you install it. You also lose some convenience in your post-installation experience, too. If you want to stick with your packaging system even with CPAN modules, you have to wait for someone to create a package for the distributions that you want to use. Some packaging systems have good tools to easily convert most Perl modules, and you can even create your own packages.
Some of the packaging systems make changes to the Perl distributions (including adding bugs) that might cause you some headaches, and some might not include the complete Perl distribution.
Advantages
- You can easily replicate installations.
- You get some support as your operating system community maintains the package system.
Disadvantages
- You can’t choose the particular compilation options.
- You can’t install it wherever you like.
- You may be limited to a single version of
perl
. - You may have to use the same library versions (e.g. version of expat) for all packages.
- Some packagers have poor “upstream” communication, so you use a different version of a module than the rest of the world.
Strawberry Perl
Strawberry Perl (or just “Strawberry’) is a distribution of Perl for Microsoft Windows. Since Microsoft does not supply a compiler as part of their consumer operating system, you can’t build perl
on your own. Not only that, but you can’t install some Perl modules without a compiler. Strawberry comes with a compiler and the other tools that you need to get around this.
Strawberry augments the Perl standard library, coming with many of the modules that you’d likely install immediately if they weren’t included. These include some of the more untamed distributions that have tricky compilations, such as XML::Parser
, DBD::mysql
and many of the Win32
modules with some restrictions in the 64-bit version).
Strawberry is mostly the work of a very small group of people, although it has a dedicated and mostly content customer base. Response times to questions and problems might not be immediate, but you can often get by with the free support if immediacy is not a problem for you. Also, you might have a wait a few weeks or months to get a new Strawberry Perl for the latest Perl distribution.
Advantages
- You can install Perl on Windows without a compiler
- You get a compiler so you can install modules directly from CPAN
Disadvantages
- You have to wait a bit to get a Strawberry Perl for the latest
perl
.
ActiveState Perl
ActiveState offers ActivePerl, a free distribution of Perl for many operating systems, including Microsoft Windows, Linux, MacOS X, and Solaris. However, the advantage to ActivePerl is its paid, enterprise support. There’s someone you can call to get help, and ActiveState prepares special Perl modules packages for use with their Perl Package Manager (PPM) application. They also augment the standard Perl library, and provide several other tools, such as Komodo, that easily integrate with ActivePerl.
The changes in the main perl
quickly show up in ActivePerl because they are mostly working from the same code base, and the ActiveState Perl developers are active in main-line perl
development.
Advantages
- You can get enterprise-level support
- You can use the same Perl across several operating systems
- ActiveState provides prepared packages on Perl distributions
Disadvantages
- You have to pay for the enterprise support.
Things to Remember
- My list of advantages and disadvantages aren’t equally weighted and you must judge them based on your situation and preferences.
- You can compile, install, and maintain your own Perl, or get someone else to do part of the job for you.
- When you use a packaging system, you have less choice and have to live with their decisions.
- You can get enterprise support for Perl, if you pay for it.