Does installing Perl modules require a paid license? - perl

I need to work on a Perl script that has some tasks, like reading/writing Excel sheets, connection to an Oracle database, etc.
First I used ActivePerl. On installing modules, ActivePerl threw an error:
Authorization required 401
(I.e., it requires a business licence for adding modules.)
Then I tried the same with Strawberry Perl, but I still could not install.
What I have tried:
CPAN
ppm
Download a module and install using it nmake
Install modules using the Padre Perl IDE.
Is this a license issue? Or am I missing something here? Is Perl a free distribution for development?
The image shows installing DBD::Oracle on Strawberry Perl v5.22.0:

It looks like you are using Strawberry Perl. That requires no license or other special steps to use. It's ready to go.
One of the top lines of output in your picture is "Can't connect to cpan.strawberryperl.com:80". It then tries to connect to other sites and has the same failure. It looks like a network issue.

The community edition of ActivePerl provides support to only the latest versions of Perl, and access to the packages ActiveState built for older versions is available in Business and Enterprise edition.
If you install Perl 5.18.4, 5.20.2 or 5.22.0 then you'll not get a 401 error.
Alternate solution: Use CPAN instead of ppm to install Perl modules.
See more at: Download and Install Perl: ActivePerl

ActiveState is a commercial company. They release a community edition, but they make money from support. Part of that means they only offer "free" the newest versions. Which is why you get the error you do - upgrade to a newer Perl, and they'll let you update.
More broadly - technically each module can be licensed separately. There's no requirement to release Perl code (including modules) under any sort of FLOSS license.
However, bear in mind that the ActiveState community edition isn't the same license as CPAN modules would be. CPAN modules are "Mostly GNU". But ActiveState CE has some additional terms.
For example,
The use of the Software is unsupported and is for non-commercial or non-production use.
You should make a point of reviewing licenses, because it really is a bit of a minefield if you're not careful.

Related

The Perl API to ServiceNow stopped supporting TLS 1.0 and 1.1. Are there any quick Perl 5.8 fixes?

I am a perl developer and have been working on a ServiceNow API to create change tickets. It has been working well until this past Friday when ServiceNow depreciated support for TLS 1.0 and 1.1. My version of Perl is 5.8 so it's quite old. Are there any quick Perl 5.8 fixes?
Here are the perl modules I'm using.
use MIME::Base64;
use HTTP::Proxy;
use JSON;
use REST::Client;
the new errors;
Response: 500 SSL negotiation failed:
Response status: 500 Header: Content-Type=text/plain Header: Client-Date=Fri, 10 Jan 2020 23:06:10 GMT Header: Client-Warning=Internal response 500 SSL negotiation failed:
If you have any say in this you should really, really, really, really, really update your Perl. I mean, really. 5.8 is ancient.
If you cannot do that, you must at least update the piece of code that handles the TLS to a version >= 1.2 (Good luck!). Rest::Client uses LWP::UserAgent which in turn uses either Net::SSL or IO::Socket::SSL (I think) for the SSL stuff. If both are present Net::SSL will be used.
So you must investigate which one(s) you have and update one of them. Net::SSL is probably your best bet, since it is just a wrapper around the c library openssl (apt!). The other one probably has a rats tail of dependencies, but I didn't look.
Perl 5.8.0 is from July 2002. Perl 5.8.8 (which is what I suspect you are actually using) is from January 2006. Both of these are ancient versions and I highly recommend not using them.
I realise that you're using a specific version of an operating system (I'd guess RHEL5) and that upgrading your OS is a project that your company aren't going to want to undertake. But this is why we don't use the system installed version of Perl.
You have a few options.
Install another version of Perl alongside the system Perl. Put it in /opt/perl or somewhere like that. Make it a recent version and install a completely new library of modules for it. perlbrew is one nice way to achieve this.
Use a virtual machine or, better, a Docker container to host your API. That can be a newer OS, running a newer version of Perl with a newer version of the system libraries (which you're probably going to need - as your older version of openssl probably doesn't support TLS 1.2).
Stop using legacy hardware to host your project and move it into a cloud provider like AWS.
You either need to be more agile about updating your OS (which very few companies are very good at) or you need to separate your application's runtime environment from the underlying OS. That second route is what switched-on projects have been doing for several years now.

Is it possible to install Time::Stamp module in ActivePerl 5.8.8 build 820

Is it possible to install the Time::Stamp module in ActivePerl 5.8.8 build 820?
I get a 401 authorisation error when I try to install the package via ppm.
Regards, john.tm
Unless you pay for support the only way I know to install anything in a version that old is to use cpan.
cpan Time::Stamp

Building perl win32 libs in Visual Studio 2008

We currently use perl 5.6 library in our application. No idea where it originally came from (before my time in the company). Now we need to upgrade this library to 5.14 for a number of customer requests... does anyone have the experience on how to build Perl 5.14 in Visual Studio? I know there is a complete readme.win32 but I would like to have a VS solution (as anything else in our dev environment has this). Is there any way to make a solution file from the makefile that is provided with perl 5.14 distribution?
You can get ActivePerl 5.14.2 binaries pre-built and free from Activestate: http://www.activestate.com/activeperl/downloads

How can I install Crypt::SSLeay on a Win 64?

I've got 64-bit Vista with ActiveState Perl "v5.10.0 built for MSWin32-x64-multi-thread" and I'm trying to get the Crypt::SSLeay package installed along with versions of libeay32.dll and ssleay32.dll.
I've done this before on a Win32 machine using the 'uwinnipeg' server, but I'm running into issues with my 64-bit system.
ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
ppm install failed: The PPD does not provide code to install for this platform
I've tried a straight ppm install which seemed to work, but verification fails and I don't see any sign of the dll files?
C:\Perl64\bin>ppm install Crypt::SSLeay
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Syncing site PPM database with .packlists...done
No missing packages to install
C:\Perl64\bin>ppm verify Crypt::SSLeay
ppm verify failed: Package 'Crypt::SSLeay' is not installed
Does anyone know where/how I could get versions that are compatible with my PC?
There are a few issues here: First, AFAIK, you need OpenSSL v1.0.0 or greater for Windows 64. Second, until recently, Makefile.PL in Crypt-SSLeay did not detect correctly OpenSSL versions greater than 0.9.x.
I think you want to upgrade at the very least to Perl 5.10.1 as it fixed a number of crucial performance related bugs.
If you install mingw via ActiveState's ppm (I am assuming ppm install mingw would work even though I haven't tried it on a 64-bit system), you can use it to build OpenSSL 1.0.0a and Crypt-SSLeay.
Update: You probably don't need Crypt::SSLeay. See:
DO YOU NEED Crypt::SSLeay?
Does your code really depend on Crypt::SSLeay?
Don't declare a dependency on Crypt::SSLeay (or IO::Socket::SSL either).
Also useful:
Building OpenSSL 1.0.1g on 64-bit Windows Pro 8.1 with Windows SDK 7.1
Compile Vim and OpenSSL with Visual Studio 2013 Community Edition.
Sinan has very recently released a new version of Crypt::SSLeay which might clear up some Windows installation issues. I doubt it's made its way into a PPM yet.

Where do I get the MQ DLLs I need for Perl's MQClient::* and MQSeries:: modules?

I need to rejig some VERY old Windows code that uses Perl to talk to MQ. Specifically, I need to be able to install Perl's MQClient::MQSeries, MQSeries::QueueManager, MQSeries::Queue and MQSeries::Message modules.
When I fire up Strawberry Perl, go into CPAN and try to install them, I can see that there's several MQ client DLLs that are required for these Perl modules to build. However, they're not on my system, even after downloading and installing the current MQ Client from IBM.
It used to be that downloading and installing the MQ Client from IBM gave you the option to install a whole bunch of development libraries (presumably including the bits necessary to install the above Perl libraries), but it seems that's no longer the case. For example, there's no MQM.DLL file anywhere, which is one file that the Perl libraries seem to need to build correctly.
Suspect I've probably just not installed the correct MQ Client package to get this stuff, but have no idea where to find it (Google is no help). Any suggestions?
MQSeries 1.29 was released in 16 Jun 2009, so I guess you can just ask it's maintainer.
You can also ask in newsgroup news://news.software.ibm.com/ibm.software.websphere.mq , or ask IBM's support.
where'dja get the MQ download?
maybe you might try mqseries.net - it's a hotbed of MQ activity.
I'd suggest downloading the WMQ Client installation. Depending on which one you want, v7.0 is SupportPac MQC7 and v7.1 is SupportPac MQC71. This will get you the client libraries with which to build the Per module. If you need the server libs, the Evaluation download of WMQ Server v7.1 is here: