Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

libwww problem

Status
Not open for further replies.

gnikol1

IS-IT--Management
Jan 30, 2002
29
EU
Hello to all

I am writing the below and when I am running it I am getting the error:
Can't locate object method "proxy_authorization_basic" via package "LWP::UserAgent" (perhaps you forgot to load "LWP::UserAgent"?) at yahoo_login.pl line 6

use LWP::UserAgent;
my $url='
my $ua=LWP::UserAgent->new;

$ua->proxy(http => '$ua->proxy_authorization_basic("user", "pass");

$ua->agent('SecretBrowser/007');
$ua->timeout(60);

my $request=HTTP::Request->new(GET=>$url);
my $response=$ua->request($request);
if ($response->is_success) {
prnt $response->conctent;
}
else {
print "Error Getting Document: ",
$response->status_line, "\n";
}
 
I think you need to check the results of:

my $ua=LWP::UserAgent->new;

maybe like this:

my $ua=LWP::UserAgent->new
or die "LWP::UserAgent->new failed\n" Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
I didn't see a method/function named proxy_authorization_basic in the module.
 
And I didn't check, sorry... :~/ Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top