Modernizing ActivePerl for Perl Power Users

modernizing active perl

ActiveState regularly releases new versions of our ActivePerl Community Edition (CE), which packages the latest release of Perl from perl.org along with hundreds of the most popular Perl modules in a pre-built distribution that developers can quickly download, install and use to build their applications, services and scripts.

We’ve skipped ActivePerl 5.30 for now in order to focus on the latest Community Edition of ActivePerl, which will be based on Perl 5.32. As usual, it will contain:

 

But in a twist, this time around, ActivePerl will no longer be a pre-built, one-size-fits-all distribution.

 

Pre-Built Perl vs On-Demand Perl

ActiveState formerly assembled ActivePerl essentially by hand. This meant:

 

  • Sourcing, building and maintaining multiple build environments for multiple operating systems, featuring:
    • C compilers
    • Build scripts Installers/packagers
    • Ingredients data files containing the all the metadata (version, requirements, build/install commands, etc) for each module to be built
    • Source code for each module/dependency
  • Correcting all metadata errors for each module/dependency to be built
  • Patching known vulnerabilities
  • Applying our own custom patches to address legacy functionality and make Perl work well with our (now deprecated) Perl Package Manager
  • Resolving all conflicts between modules, their dependencies, as well as any OS-level dependencies
  • Compiling each module/dependency from source code, and resolving inevitable issues

Handcrafting large Perl distributions in this way can be painful, depending on how drastically each version of Perl, key modules, compilers, etc have changed between releases. And as with any craft, it takes time, which is why new ActivePerl distributions typically come out weeks to months after the release of a major community Perl version.

To overcome that lag, we built the ActiveState Platform, which automates many of the manual steps listed above. In fact, we’ve been using the ActiveState Platform to help build our latest ActivePython Community Editions. And since we launched the beta release of the ActiveState Platform in January 2019, thousands of developers have been using it to automatically build their Perl environments on-demand.

 

Building Perl in Parallel

With ActivePerl 5.32 we’re trying something new in order to provide you with a distribution that:

 

  • Contains up-to-date versions of all modules
  • Provides you with all the dependencies your project requires
  • Is automatically assembled for you on demand

But this also means that there will no longer be a pre-built Community Edition that you can simply download with a single click. Instead, the ActiveState Platform will build a version of ActivePerl 5.32 based on your choices, including:

 

  • The operating system you want to deploy on: Windows or Linux (Mac coming soon)
  • The “bundles” of modules/dependencies that make sense for your project.
    • Need testing tools? Of course you do, so select the Testing bundle.
    • Working on a Web app? Choose a WebDev bundle.
    • Working with Win32 systems? Choose the Win32 bundle.

Bundles - ActivePerl

And so on. You can get as granular as you want by adding individual dependencies/changing dependency versions within bundles, or simply click “Select All.” This will include all the available bundles in your version of ActivePerl, creating a large distribution similar to our original ActivePerl CE.

 

In other words, you get your own ActivePerl, the way you want it.

But if you’ve used the ActiveState Platform previously, you’ll notice something different: parallel builds. Depending on the number of dependencies and operating systems you chose previously, the ActiveState Platform may have taken up to an hour (or more) to complete building and packaging your environment since it built everything serially.

This time around, we’ve updated the ActiveState Platform so it:

 

  • Knows which dependencies can be built in parallel
  • Pulls pre-built dependencies from cache

The result is a dramatic increase in build speed, which means you can typically get your version of ActivePerl 5.32 in seconds. However, please keep in mind that not every module version is buildable for every OS version at every point in time. We try our best to ensure that all the modules in all bundles are buildable, but they may not actually build for your particular bundle combination/OS. Logs are provided for each module to aid in solving build issues, or you can always ask for help in our community forums.

 

The New ActivePerl

With ActivePerl 5.32 we’re making some other fundamental changes, as well.

For example, for better or worse, ActiveState patched the community version of Perl in order to create what we felt was a better, more stable user experience, as well as to align it with our ecosystem. The result was a version of Perl that many non-sophisticated users found easier to install, use, and add dependencies via ActiveState’s Perl Package Manager (PPM). More sophisticated Perl users, however, who didn’t need the hand-holding features of ActivePerl preferred to use a version of Perl from the community.

With ActivePerl 5.32, we will no longer apply our ActiveState patching, and instead, deliver a version of ActivePerl that works and feels much more like standard perl.org distributions. However, we don’t want to abandon our traditional users who have come to expect an enhanced user experience. To that end, ActivePerl 5.32 will come with the ActiveState Platform’s Command Line Interface (CLI), the State Tool, which will simplify installation, usage and the adding of dependencies.

 

Perl Installation the Modern Way

 

Linux users will now be able to install ActivePerl directly from the command line. Windows users, at least for now, will also install via the command line.

In both cases, the State Tool will facilitate the installation of ActivePerl into a virtual environment to ensure your versions of Perl and associated projects are isolated from one another, avoiding dependency conflicts and environment corruption.

Similar to the way that plenv or perlbrew (or berrybrew on Windows) have been providing the Perl community with virtual environments for years, the State Tool will deliver the same functionality with two key differences:

 

  • Cross-platform support, which currently includes Windows and Linux (Mac coming soon), allowing development teams to standardize on ActivePerl while continuing to use their OS of choice.
  • Multi-language support, which currently includes Perl and Python (more coming), simplifying the development of applications that incorporate more than one language.

Additionally, the State Tool will:

 

  • Allow you to add one or more dependencies to your environment with a simple state add <package> command. Any required C libraries will automatically be built by the ActiveState platform for you (similar to PPM) so you don’t need to install and maintain a compiler environment on your system.
  • Update your Perl environment on the ActiveState Platform. All dependencies, including transitive dependencies, used in your environment are saved so you’ll be able to seamlessly restore any previous working environment at any time, even years later.

We believe the benefits of an up-to-date ActivePerl deployed into a virtual environment that is always restorable offers significant enough advantages to warrant the move from a pre-built ActivePerl CE to on-demand builds of ActivePerl that better fit your project needs. We encourage you to give it a try when it launches shortly on the ActiveState Platform.

Next Steps

Get familiar with how the ActiveState Platform and the State Tool work today:

UPDATE: ActiveState introduced a new version of our Perl ecosystem with the release of Perl 5.32, which provides a new way to install, work with and even consume Perl from ActiveState. You can learn more and download your own version of ActiveState’s new Perl ecosystem for free from our Perl 5.32 page.

 

Related Blogs:

Advanced Package Management for Perl Developers

Universal Package Managers? Meet the State Tool

State Tool: How to install a Perl environment with a single command?

Recent Posts

Scroll to Top