Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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):
  • 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 just set up the environment accordingly, and LWP::Simple DWYM.

regards,
tomte


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


In reply to Re: How to make LWP::Simple use a proxy? by Tomte
in thread How to make LWP::Simple use a proxy? by freak

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-25 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found