[Israel.pm] Perl and HTTPS domains
margol at beamartyr.net
Thu Dec 27 01:15:13 PST 2012
ActivePerl will give you HTTPS support, too. I don't remember if it's
out-of-the-box, or if you need to "ppm install Crypt-SSLeay", but it's
one or the other....
On 27/12/2012 10:57, sawyer x wrote:
> Last meeting someone asked about handling HTTPS domains in Perl,
> specifically using WWW::Mechanize.
> Shortest version (for Windows only):
> 1. Install DWIM Perl.
> Relatively short version:
> 1. Install the OpenSSL C development library. I'd be happy if someone
> shared how to do this on Windows. In Debian (and Debian-based) GNU/Linux
> you'll need libssl-dev, in RedHat (and RedHat-based) GNU/Linux you'll
> need openssl-devel.
> 2. Install Crypt::OpenSSL.
> 3. Make sure you have LWP::Protocol::https module installed.
> Long version (explanation):
> Since WWW::Mechanize is basically a sophisticated wrapper around LWP, it
> will use LWP::UserAgent. LWP used to be a big library, but now it's
> split into many little libraries. One of these is the HTTPS protocol
> library for LWP called LWP::Protocol::https, which is what
> LWP::UserAgent will use to fetch pages from HTTPS URLs. It will in turn
> use the OpenSSL library (known by the original name for OpenSSL):
> Crypt::SSLeay. Since Crypt::SSLeay is basically bindings to the OpenSSL
> C library, you'll need to have that installed.
> So, you'll need to install the OpenSSL C library (development files:
> headers, etc.), the Perl bindings (Crypt::SSLeay), the LWP HTTPS
> protocol (LWP::Protocol::https) and from that point LWP::UserAgent and
> WWW::Mechanize will use HTTPS seamlessly.
> Hope that helps!
> Perl mailing list
> Perl at perl.org.il
More information about the Perl