Hello, maybe my problem is trivial, but I cannot find an answer. I will try to explain you what is going on.

The simplest problem to explain is when I try to download a module using cpan. I always get the error:

Fetching with LWP: ftp://mirrors.localhost.net.ar/pub/mirrors/CPAN/authors/id/whatever Use of uninitialized value in hash element at /Library/Perl/5.8.6/LWP/ +Protocol.pm line 53. Use of uninitialized value in pattern match (m//) at /Library/Perl/5.8 +.6/LWP/Protocol.pm line 56. Use of uninitialized value in concatenation (.) or string at /Library/ +Perl/5.8.6/LWP/Protocol.pm line 36. Use of uninitialized value in string eq at /Library/Perl/5.8.6/LWP/Use +rAgent.pm line 199.

The extracted lines where the errors come from are:

Protocol.pm line 53 my $ic = $ImplementedBy{$scheme}; line 56 return '' unless $scheme =~ /^([.+\-\w]+)$/; # check valid + URL schemes line 36 my $impclass = LWP::Protocol::implementor($scheme) or UserAgent.pm line 199 if ($scheme eq "https") {

So, it seems that I have a problem with the assignement of a value to the variable $scheme. Other scripts that use LWP::UserAgent and LWP::Protocol give me the same type of errors, but I write down more explicitely the problem with the cpan modules because they should be more familiar for you.

All I could find about $scheme had something to do with setting or using proxies, is that true? I have no proxies set in my configuration, or they have been assigned automatically by my ISP, I don't know about that.

So, some questions arise: what can I do to solve that problem? Where I can find more information? Where I should start reading? What is that $scheme variable?

Thank you in advance for your help.

Roger


In reply to 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.