[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] LWP::Simple proxy configuration



Hey,

    This is driving me crazy.  I can get() a page like this:

use LWP::UserAgent
$ua = new LWP::UserAgent;
$ua->proxy(http  => 'http://my.proxy.int:8080');
my $req = new HTTP::Request ('GET', 'http://www.yahoo.com/');
$page = $ua->request($req)->as_string;

print $page;

    but can't get it using LWP::Simple.  I try setting the "html_proxy"
environment variable (Simple calls the env_proxy function of its
UserAgent object) but it doesn't work:

$ENV{'http_proxy'} = 'http://my.proxy.int:8080';
use LWP::Simple;
print (get "http://www.yahoo.com");

    I tried setting the no_proxy variable, but that didn't help.  Am I
doing this right?  Please email me at craig@enquirer.com as I no longer
subscribe to this list.  Thanks.


Craig M


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch