-2

I'm brand new to Perl and have been tasked with picking up some existing code for a project to allow online payments between my institution and a 3rd party.

The bulk of the code has been written. All I have to do is create and POST an XML file to the 3rd party over https and read the xml that's sent back in the response. I have created the XML file, now I need to POST it to the url provided by the 3rd party over https.

I did a bit of research and found lots of examples of using the LWP::Protocol:https module. All great so far. But it turns out that we have to use a version of Perl that is packaged with one of the other systems that we use and the LWP::Protocol:https module has not been installed.

I get this error: 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed) Content-Type: text/plain Client-Date: Wed, 26 Nov 2014 15:50:58 GMT Client-Warning: Internal response LWP will support https URLs if the LWP::Protocol::https module is installed.

Our UNIX admin tells me that he can't install this module. We also can't alter the PATH variable to point to another Perl installation. He has suggested using the unix wget command as a workaround. Could anyone help me with a script to do this or point me to a website that explains the wget command for a novice? I'm finding the amount of information out there pretty overwhelming :/

Thanks for reading.

wg11
  • 3
  • 2
  • If your system has a compiler you can install anything you want locally under the user directory. Perl modules can be installed under the user folder too. No need to do battle with the admins. http://stackoverflow.com/questions/540640/how-can-i-install-a-cpan-module-into-a-local-directory – Casper Nov 26 '14 at 17:20
  • 1
    the curl command is likely going to be easier to use than wget – ysth Nov 26 '14 at 17:30
  • @Casper With `LWP::Protocol::https`, it's a little more complicated than that, since I believe you need the OpenSSL headers as well. – ThisSuitIsBlackNot Nov 26 '14 at 17:35

1 Answers1

1

Please check if you have local::lib module installed. If you do - installing modules locally could be as simple as typing:

perl -MCPAN -Mlocal::lib -e shell
cpan> install LWP::WhatEver

If you continue to install new modules this way, they will all be installed in ~/perl5 directory (in your home dir).

Also, curl IS a great option.