It seems from the use in LWP::UserAgent that $scheme is just the first part of a http address, like 'https', 'http', 'file' ...

The code in UserAgent uses the scheme of the http address it wants to access, except when it has to go through a proxy. Then it uses the scheme of the proxy instead.

I'm only making wild guesses now, but your problem could still come from the proxy handling. You might check your environment variables, maybe there is a malformed proxy definition there:

#bash set | grep -i proxy #csh/tcsh printenv | grep -i proxy
I would also recommend deleting .cpan in your homedir (or roots homedir) and so resetting your configuration of cpan. Since you have these problems with other scripts too, the chance that this will help is not very high but doesn't hurt to try

You might create a minimal LWP program (just accessing a web page), and use LWP::Debug to create a logfile. Check the logfile or post it here (together with the version of perl you are using).

UPDATE: minor clarification


In reply to Re: Uninitialized $scheme variable in LWP::Protocol and LWP::UserAgent problem by jethro
in thread Uninitialized $scheme variable in LWP::Protocol and LWP::UserAgent problem by rogerd

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.