Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Can't locate object method "new" via package "LWP::Protocol::https::Socket"

by kcott (Archbishop)
on Jul 08, 2022 at 21:31 UTC ( [id://11145376]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Can't locate object method "new" via package "LWP::Protocol::https::Socket"
in thread Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Here's some troubleshooting tips. You'll need to make a few adjustments for your MSWin vs. my Cygwin: double quotes around perl commands springs to mind; there may be others.

If cpan is telling you "LWP::Protocol::https is up to date", but perl is telling you "LWP::Protocol::https not installed", that generally suggests you're running different versions. They should be in the same directory:

$ which perl /home/ken/perl5/perlbrew/perls/perl-5.36.0/bin/perl $ which cpan /home/ken/perl5/perlbrew/perls/perl-5.36.0/bin/cpan

Check what's in @INC:

$ perl -E 'say for @INC' /home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/cygwin +-thread-multi /home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0 /home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/cygwin-thread-mu +lti /home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0

perl -V will give you that information and a lot more. There could be something useful in that output.

Try to load just the module:

$ perl -e 'use LWP::Protocol::https'

That will just return (no output) on success or you might get "Can't locate LWP/Protocol/https.pm in @INC ...".

If that was successful, get more information:

$ perl -E 'use LWP::Protocol::https; say $LWP::Protocol::https::VERSIO +N; say $INC{"LWP/Protocol/https.pm"}' 6.10 /home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/LWP/Pr +otocol/https.pm

Note that last line of output should match a directory in @INC obtained earlier. In my case:

/home/ken/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0

See how you go with those. A solution might present itself. If still stumped, post all output from those commands and we can look into it further.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found