Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Proxy with LWP

by tachyon-II (Chaplain)
on Apr 23, 2008 at 07:07 UTC ( #682330=note: print w/ replies, xml ) Need Help??


in reply to Proxy with LWP

No changes to LWP required. You can get LWP::Simple to export the underlying LWP::UserAgent object. Once you have that you simply set the proxy option if the environment dictates. Just patch your module like this and it should work:

use LWP::Simple qw( get $ua ); $ua->proxy( ['http'], $ENV{HTTP_PROXY} ) if exists $ENV{HTTP_PROXY};


Comment on Re: Proxy with LWP
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-08-20 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls