On Mon, Feb 14, 2011 at 7:17 PM, Michael Miller <mmil...@ldmgrp.com> wrote:
> LWP will support https URLs if the Crypt::SSLeay module is installed
> AND
> 500 Can't locate object method "new" via package 
> "LWP::Protocol::https::Socket"
>
> I guess I'm missing a shared library or something I need to copy over to the 
> target machine; but I can't figure out which library I should be copying.
>
> The packed 'bridge' file seems to have everything inside of it:
>
> unzip -l bridge | grep Crypt
>     1171  11-02-14 09:16   lib/Crypt/SSLeay.pm
>       84  11-02-14 09:16   lib/Crypt/SSLeay/CTX.pm

LWP and its myriad of runtime dependencies is tricky, but I thought
that was fixed in Module::ScanDeps. You should also see

Net/SSL.pm
Net/HTTPS.pm

I tried the following example here and it works for https URLs:


#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my ($url) = @ARGV;
my $ua = LWP::UserAgent->new(timeout => 30);

my $r = $ua->get($url);
die "GET $url failed: ", $r->status_line unless $r->is_success;
print substr($r->content, 0, 70), "...\n";


When I strace the result of pp'ing this script, the only unsusal shared libs
loaded (aside from the ones in the cache area)  are libssl and libcrypto.
What does

$ readelf -d /where/ever/lib/auto/Crypt/SSLeay/SSLeay.so

report?

Cheeres, Roderich

Reply via email to