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


In reply to Re^3: Can't locate object method "new" via package "LWP::Protocol::https::Socket" by kcott
in thread Can't locate object method "new" via package "LWP::Protocol::https::Socket" by Philbert

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.