Re: http_proxy

[email protected] (Boyd Duffee) Wed, 05 Oct 2011 20:05:27 +0100
Newsgroups perl.libwww
Message-ID <[email protected]>
Nigel Horne wrote:
> On 5 Oct 2011, at 14:50, Boyd Duffee wrote:
> 
>> Hi there,
>>
>> I'm writing a module SRU::Client and like a good boy, I wrote a test script (using Test::More).  I couldn't figure out why the test script would run on one machine, but not on another, until I found that the machine it wouldn't run on had the HTTP_PROXY set.  When I unset that variable in the shell, the script works, but I cannot for the life of me unset HTTP_PROXY in the script itself.
>>
>> Things that don't work:
>> undef $ENV{HTTP_PROXY}
> 
> Try:
> 
> delete $ENV{HTTP_PROXY};

I did.  No joy.

perl -MLWP::Simple -e 'delete $ENV{HTTP_PROXY}; print 
get("http://www.google.co.uk")'

doesn't work, but

unset HTTP_PROXY; perl -MLWP::Simple -e 'print 
get("http://www.google.co.uk")'

does work.

I'd also tried deleting or undefing http_proxy as well.  Keep the 
suggestions coming.

thanks,
-- 
Boyd Duffee				Keele University
Systems Guy				(01782) 734225	
   "Ё моё!" - Pavel Andreievich Chekov