CodeJunkie has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I posted a message about this problem a couple of days ago, but I didn't really include enough detail I guess because I didn't get much of a response. I hope nobody has a problem with me posting about it again. This time i've included the example code i'm running, the URL it falls over when connecting and the error message I am given. The code is taken from the example provided by the author in the download from CPAN.
If anyone can give me any clues about this i'd be grateful.
#!/usr/bin/perl -w require LWP::Parallel::UserAgent; use HTTP::Request; # display tons of debugging messages. See 'perldoc LWP::Debug' #use LWP::Debug qw(+); # shortcut for demo URLs my $url = "http://www.bankerstrust.com/"; my $reqs = [ HTTP::Request->new('GET', $url), ]; my $pua = LWP::Parallel::UserAgent->new(); $pua->in_order (1); # handle requests in order of registration $pua->duplicates(0); # ignore duplicates $pua->timeout (2); # in seconds $pua->redirect (1); # follow redirects foreach my $req (@$reqs) { print "Registering '".$req->url."'\n"; if ( my $res = $pua->register ($req) ) { print STDERR $res->error_as_HTML; } } my $entries = $pua->wait(); foreach (keys %$entries) { my $res = $entries->{$_}->response; print "Answer for '",$res->request->url, "' was \t", $res->code,": " +, $res->message,"\n"; }
When trying to connect to this URL
http://www.bankerstrust.com/
I get this message
Undefined subroutine &LWP::Parallel::UserAgent::_new_response called a +t /usr/lib/perl5/site_perl/5.6.0/LWP/Parallel/UserAgent.pm line 1447.
Many thanks,
Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parallel Web Agent Problem
by derby (Abbot) on Mar 11, 2003 at 15:12 UTC | |
by CodeJunkie (Monk) on Mar 11, 2003 at 15:20 UTC | |
by CodeJunkie (Monk) on Mar 11, 2003 at 22:36 UTC | |
|
Re: Parallel Web Agent Problem
by perrin (Chancellor) on Mar 11, 2003 at 16:37 UTC | |
by Aristotle (Chancellor) on Mar 15, 2003 at 12:37 UTC |