Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

What would be the recommended way to make https requests (GET and POSTs) in a perl program and have the program be portable across different (but not too old e.g. > 7 years) versions of Redhat, Ubuntu, suse, OS X, Solaris, AIX?

I cannot compile stuff on the machines the program is going to be used.

Are there pure-perl implementations for LWP with https support?

Replies are listed 'Best First'.
Re: Cross platform https?
by roboticus (Chancellor) on Dec 03, 2010 at 11:48 UTC

    Perhaps you could use an external tool (like wget) to do the HTTPS stuff, and do the surrounding work in your perl code?

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Re: Cross platform https?
by Anonymous Monk on Dec 03, 2010 at 08:36 UTC
    I cannot compile stuff on the machines the program is going to be used.

    Then you can't write programs either :) Yes, even you can use CPAN

    Are there pure-perl implementations for LWP with https support?

    No, there is no money in writing an extra extra extra slow https library to avoid some compilation

      Yes even I can use CPAN and write programs once in a while.

      But it'll be impractical to get various users to download and compile CPAN modules on their different machines (running OSX, Ubuntu etc).

        Consider using PAR to package your script, modules and dependant files.

        But it'll be impractical to get various users to download and compile CPAN modules on their different machines (running OSX, Ubuntu etc).

        So provide the modules for your users?

        Or petition those yum/apt/rpm... maintainers to make the packages you need available (I'm sure most are already available)

        I would still go for a CPAN module and a C implementation of the MD5 stuff. Having said that, maybe you could give Digest::MD5 a try?! This is not a Perl interface but fully implemented in Perl. Needless to say it will be (much) slower of course.

        Cheers

        Harry