Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Automate your PerlMonks activities

by Chief of Chaos (Friar)
on Nov 27, 2002 at 09:47 UTC ( #216034=note: print w/replies, xml ) Need Help??

in reply to Automate your PerlMonks activities

How can I configure it to use a proxy:port for connection ?

Replies are listed 'Best First'.
Re: Re: Automate your PerlMonks activities
by grantm (Parson) on Nov 27, 2002 at 11:42 UTC
    Did you try setting your 'http_proxy' environment variable to 'http://proxy:port'? That's the standard way for LWP scripts.
      True, but the script needs to be told to use the proxy. For pm_login, add this line between lines 18 and 24:
      $ua->proxy( 'http', $ENV{ HTTP_PROXY } ) if $ENV{ HTTP_PROXY };
      I'm sure similar additions can be made to each script that needs it to add proxy functionality.
      Love justice; desire mercy.

        You're right of course, you do need to tell the UserAgent to use the proxy, but if you use the standard variable names (all lower case) then you simply say:

        You shouldn't need to do this. The module automatically calls $ua->env_proxy;
        You should need merely to   export http_proxy=http://host:port or   setenv http_proxy http://host:port You might want to retrieve the latest version, too. It has some nice new features.

        ...porque es dificil estar guapo y blanco.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2022-05-23 14:00 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.