Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to make LWP::Simple use a proxy?

by sgifford (Prior)
on May 04, 2004 at 16:35 UTC ( [id://350415]=note: print w/replies, xml ) Need Help??


in reply to How to make LWP::Simple use a proxy?

This is in the documentation for LWP::Simple:
The user agent created by this module will identify itself as "LWP::Simple/#.##" (where "#.##" is the libwww-perl version number) and will initialize its proxy defaults from the environment (by calling $ua->env_proxy).
and for LWP::UserEgent:
$ua->env_proxy
Load proxy settings from *_proxy environment vari­ables. You might specify proxies like this (sh-syntax):
             gopher_proxy=http://proxy.my.place/
             wais_proxy=http://proxy.my.place/
             no_proxy="localhost,my.domain"
             export gopher_proxy wais_proxy no_proxy
csh or tcsh users should use the "setenv" command to define these environment variables.

On systems with case insensitive environment variables there exists a name clash between the CGI environment variables and the "HTTP_PROXY" environment variable normally picked up by env_proxy(). Because of this "HTTP_PROXY" is not honored for CGI scripts. The "CGI_HTTP_PROXY" environment variable can be used instead.

So you should be able to simply set the appropriate environment variables.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-18 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found