Perl v.26 - Installing Modules

Hello and Good Morning.

have been using an older version of perl for the longest time (5.8.8)… and am now trying to upgrade to at least 5.26. I have installed this on a windows 2016 server but am trying to figure out how to download/install additional modules (e.g., net::ldap, soap::lite etc) as don’t quite understand the alternative to ppm (when I run ppm). Any assistance would be greatly appreciated.

Thanks and Stay Safe!

br
ken

The ActiveState Platform has some aspects of operation that are similar to Source Code Control software. To add or remove modules to older versions like 5.26 or 5.28, one method is to fork a copy of the original version we provide and use the Add Module Pane from your Dashboard to add what you want to a single installer.
https://docs.activestate.com/platform/projects/fork/
I would recommend using 5.28 if you can. 5.26 is End of Life at the Perl Community and is not getting much attention in the last year, so it’s less likely to work out of the box or in our build windows.

5.32 versions use an entirely new process, and they don’t create a monolithic installer. With 5.32, each component is downloaded on demand, so for 5.32 you must have continual online access. With 5.32, the on demand installation model allows you to adjust the installation list even after it is installed, and download more modules without re-installing the whole thing. 5.32 versions will also install to a virtual environment that is only accessible to the user that installs them, making them extremely safe to experiment with, but not suited for installations where every user on a system is expected to be able to run the Perl.

1 Like

Hey @kydomingo,

This video and others in the playlist may also help ActiveState Platform Demo: How to build a custom Perl environment - YouTube

Cheers!
–zak

thank you very much zakg… very very useful video… was able to create a package for 5.32 with the modules I need. just a follow up question:

  1. how can I install additional modules in the future (will check the other playlist as I have not gone through all, only the main part).
  2. tried to install using the powershell script… but getting this
    Exception calling “DownloadString” with “1” argument(s): “The underlying connection was closed: An unexpected error
    occurred on a send.”
    At line:1 char:5
  • & $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(’ …

Thank you very much.

br
ken

  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:slight_smile: , MethodInvocationException
    • FullyQualifiedErrorId : WebException

The expression after ‘&’ in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At line:1 char:3

  • & $([scriptblock]::Create((New-Object Net.WebClient).DownloadString(’ …
  • + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

This is expected with Windows 10 versions prior to the 2019 releases. If you can update to the latest supported versions of Windows, you will get a newer Powershell, and won’t likely see this. Older versions of PowerShell are not configured to allow the use of TLS 1.1 and 1.2.

There’s an additional command you can run to prepare older versions.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12

That command can be modified to remove TLS 1.1 if your network has blocked that version too.

1 Like

Hey @kydomingo,

Here’s a quick video demo of adding a package via your platform.activestate.com account:

Cheers!

thank you so so so much Sir !!! :slight_smile:

Stay Safe !

br
ken

1 Like

Thank you very very much!! :slight_smile:
br
ken

Hello.

Thank you very much…

but apologies… am new to using activestate (used to using the old method of just installing perl .exe and using ppm for additional modules). am still having issues installing this package/project. running this from the command prompt is still generating the above error

powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1'))) -activate-default kydomingo/Perl-5.32.1-Windows

… even when invoking the security related command (powershell -Command "Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12). Any assistance would be greatly appreciated.

Thank you very much in advance.

Best regards,
ken

Hi @kydomingo,

Thanks for letting us know!

What version of Windows are you running?

When you ran the commands below, did you get any errors or other messages?

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor 
[Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12

Cheers!
–zak

Hello Sir,

I am running this on Windows 2016. No errors when running the [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor
[Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12 command.

most likely I’m doing it all wrong. :frowning:

thanks.

br
ken

Hey @kydomingo!

Thanks for the extra info - that helps.

It looks like the powershell command may be missing a closing " mark.

The full command should be:

powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1'))) -activate-default kydomingo/Perl-5.32.1-Windows "

Does this work?

Cheers!
–zak