Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

missing package for web service via https?

by Anonymous Monk
on Nov 03, 2006 at 16:31 UTC ( #582117=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I got the following error on my work PC, but the same code does not give any error at home, so I must have installed something there before, but I cannot remember... pls help. Thanks.

500 Can't locate object method "new" via package "LWP::Protocol::https +::Socket" at line 14

Here is the code, simple:

use strict; use warnings; #use SampleService qw=>(:all); #use SOAP::Lite +trace => qw(all); use SOAP::Lite; #$ENV{HTTPS_DEBUG} = '1'; #$ENV{HTTPS_CA_FILE} = 'C:/src/perl/a.cer'; #$ENV{HTTPS_CA_DIR} = 'C:/src/perl'; my $lite = new SOAP::Lite( #uri => '', proxy => ' +ces/module?wsdl'); while (1) { my $start = time(); print"Result = " . $lite->ping()->result . ","; my $end = time(); my $diff = $end - $start; print " started at " . localtime() . ", took " . $diff . " seconds +\n"; sleep(10); }

Replies are listed 'Best First'.
Re: missing package for web service via https?
by idsfa (Vicar) on Nov 03, 2006 at 16:40 UTC

    At a guess, you're missing LWP, which contains that package (LWP::Protocol::https::Socket). Install the bundle with:

    perl -MCPAN -e 'install Bundle::LWP'

    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://582117]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-06-17 22:55 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (107 votes). Check out past polls.