How to compile a module to a %HOMEPATH$ folder

Hi, I am a new hire in a large shop where everything is written in ActiveState perl. I would like to deploy my favorite module, Damian Conway’s Smart::Comments. My issue is I’d like to include a local compile of the module (in a %HOMEPATH% subfolder) from the command line. Because of the nature of our work all installed production servers have the same configuration. So I am allowed to include a module from the command line, but not have it installed in C:\Perl64\lib without a large discussion. So how do I go about compiling a module into a local subfolder and then including when necessary (debugging something) ?

ActiveState Perls no longer include and don’t support any of the tooling you need to compile modules locally. You won’t have consistency or guaranteed compatibility with the rest of the runtime if you source that tooling elsewhere and compile anything locally.

One caveat: If your company is stuck on a version of Perl that is older than 5.26, you can’t do anything like what you want. Local compiling isn’t supported, PPM is no longer usable, and the State Tool isn’t compatible. If you’re stuck, remind your management that it’s long past time to upgrade to a recent Perl, because all of those older versions are end of life, and most of them are long past the point where any options exist for extended support.

What you’re planning is an “old-school” way of adding some user-specific content. The ActiveState State Tool is intentionally designed to give you a better way to do this.

Fork a copy of your company’s reference version of Perl into the personal workspace of your account on The Platform, or fork it to your shared workspace if you’re allowed to do that. Add Smart::Comments to your forked copy of the standard. Put the forked copy onto your desktop system using “state activate”. Run your debugging. Exit the shell when done. Activate again if needed.

For reference, all the available commands from the State Tool.

If you’ve used Git or Github, many of the concepts will be familiar.

A runtime placed with the “activate” command will be in a virtual environment. It cannot interfere with your system version of Perl, with any other user running Perl, or with any other copies of Perl you might have for testing. Yes, with an activate, you can have dozens of different Perls for trying different things with, and they will all be isolated.