4

I'm an occasional Perl developer on Windows and Linux. I write or modify Perl scripts a few times a year when Perl is the right tool. With occasional use, I've never become a real Perl expert, but I succeed with the great help I receive in this forum.

Whenever I build or upgrade a machine, I get the latest Perl version. In 2020, I noticed Activestate was forcing logging in with an account before downloading. I did that, and didn't think much about it at the time. Later I need to add some modules, and discovered that PPM has been deprecated and removed.

That seems like a pretty big deal - like installing the latest Ubuntu and discovering apt-get has been eliminated. My understanding is Perl users are supposed to go back to Activestate and have them build a custom installer that bundles desired modules, and then re-install Perl with every change. That seems a step backwards. Is it a step toward controlling the user base, and eventually turning a free Perl into the "Perl of great price"?

What does the Perl community think about this, and what do you recommend? Am I misinterpreting the State Tool and how it works? Are you sticking with ActiveState, moving to Strawberry Perl, or something else?

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
tim11g
  • 1,935
  • 5
  • 27
  • 41
  • 2
    The standard way to install Perl modules has always been `cpan`, which should still work. AS's `ppm` repository was always a value-added service offered by AS for which they charged (after a limited free period). – ikegami Dec 02 '20 at 00:30
  • It still comes bundled with CPAN though. – tobyink Dec 02 '20 at 00:31
  • 2
    You might consider Strawberry Perl instead. I changed to that from Activeperl. Never looked back. – TLP Dec 02 '20 at 16:59
  • ActiveState provides enterprise support for Perl and many other things. If that's not your situation as a casual user, their setup isn't well suited to your workflow. – brian d foy Dec 04 '20 at 18:03

2 Answers2

7

@lordadmira’s suggestions are sensible, but I also suggest trying Perl 5.32 from the ActiveState Platform. (Full disclosure – I work for ActiveState.)

You don’t need an account and everything is open source.

It’s a one-liner in the Linux terminal or Windows Command Prompt to set up the command-line interface and install Perl 5.32 all in one go.

On Linux, in a terminal, run:

sh <(curl -q https://platform.activestate.com/dl/cli/install.sh) --activate-default ActiveState/Perl-5.32

On Windows, from Cmd, run:

powershell -Command “& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(’https://platform.activestate.com/dl/cli/install.ps1'))) -activate-default ActiveState/Perl-5.32”

From there you can add packages as you like from the command line with state install DateTime (or install a bunch from a cpanfile with state import cpanfile). (Note: Starting with Perl 5.32, state installs single packages rather than rebuilding your entire environment).

By default, it’s set up in a virtual environment and won’t mess with your system install of Perl or its dependencies.

... and if you don’t like it, just run:

state clean uninstall

... and everything gets taken off without leaving a mess.

If you want more details, there’s an overview page at https://www.activestate.com/perl-532/

If you’ve got comments or questions, you can share them at: https://community.activestate.com

If you do try, I’d love to hear what you think!

Zak
  • 1,042
  • 6
  • 12
3

I feel your pain. My solution was to use an older version that still had PPM and the MinGW compiler which lets cpan "just work".

The latest I've heard from ActiveState is that they're bringing back PPM in a new form. We'll see.

Here are your options in my order of preference. I've been doing this almost 20 years.

Windows:

  1. Use Cygwin. It's a POSIX environment for Windows and has Perl and all the compilers. There are many precompiled vendor packages. cygwin.com
  2. Install the MinGW compiler used by ActiveState so that you can compile your own modules with cpan.
  3. Use Strawberry Perl.
  4. Use an older ActivePerl that has PPM and the compiler. Then build as normal with cpan. I think it's 5.26.
  5. Engage ActiveState to get the build system and the State Tool working.
  6. Buy a support contract from ActiveState and pay them to make it work.

Linux:

  1. Use the OS Perl distribution.
  2. If the OS Perl distribution doesn't meet your needs, install all the compilers and compile Perl yourself from scratch.
  3. Buy a support contract from ActiveState and pay them to make it work.
lordadmira
  • 1,807
  • 5
  • 14
  • Re "*Install the MinGW compiler used by ActiveState so that you can compile your own modules with cpan.*", Doesn't AP automatically do that when needed? Or did they stop – ikegami Dec 02 '20 at 03:26
  • AFAIK it was taken away with PPM. They want you to use the state tool to do the compiling on their server. I actually gave up on that route and went back to 5.26 for a project. – lordadmira Dec 02 '20 at 04:30
  • Link to ActivePerl 5.26 https://platform.activestate.com/ActiveState/ActivePerl-5.26/distributions – Matthew Lock Jun 24 '21 at 12:50