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

From the pod of 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 accordingly looked up in the pod of LWP::UserAgent (emphasis again mine):

Load proxy settings from *_proxy environment variables. You might specify proxies like this (sh-syntax): 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 just set up the environment accordingly, and LWP::Simple DWYM.

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

  • Comment on Re: How to make LWP::Simple use a proxy?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.