in reply to Re: Why would LWP::Simple::get stop working?
in thread Why would LWP::Simple::get stop working?

Good thought, but alas...
c:\>perl -e "@a=grep {/http/i} keys %ENV; print int @a" 0 c:\>

Replies are listed 'Best First'.
Re^3: Why would LWP::Simple::get stop working?
by ikegami (Patriarch) on Jun 20, 2005 at 19:48 UTC

    Why "alas"? I indicated you might have started noticing the problem because of a change in that value, but you don't demonstrate a lack of change.

    What you did show is that you end up in LWP::Simple's _trivial_http_get method. (Usually, LWP calls end up LWP::UserAgent.) You could try adding debug statements to it. It could be that you end up in an endless redirection loop that LWP::UserAgent somehow avoids.

    btw, no problems here:

    >perl -le "print scalar grep {/http/i} keys %ENV" 0 >perl -le "use LWP (); print $LWP::VERSION" 5.64 >perl script.pl Fetching 'http://www.google.com' with LWP::UserAgent Retrieved 2311 bytes Fetching 'http://www.google.com' with LWP::Simple Retrieved 2311 bytes
      Alas, because I never have them set, so *any* values there would have represented a change. Sorry, in retrospect I didn't clearly state that I don't use any proxy here. So, zero keys meant to me that no proxy changes had bee instituted on my machine.
        The problem can nonetheless be found in the differences between LWP::Simple's _trivial_http_get and LWP::UserAgent. You'll probably discover something user if you print the URLs being requested and the status code in which they result..