Perl debugger with robot user agents problem

George Bray (George.Bray@moreinfo.com.au)
Wed, 9 Jul 1997 00:27:47 +1000


I am having a problem running the perl debugger with perl5.00401 and
libwww5.10. This has only started happening after a recent upgrade from
perl5.003.

I have narrowed the problem down to be demonstrated in the following
program. When this runs in the perl debugger it fails on a connect
somewhere down in libwww, yet it runs through to a successful completion
without the debugger. Robots.txt is retrieved fine, but the connect to
perform the HEAD terminates abruptly. It seems related to the robot user
agent as two successive simple requests to a "normal" user agent doesn't
have the same problem.

Anyone else had the problem or can help me out here?

---------------------------------

#!/usr/local/bin/perl

require LWP;
use LWP::Debug qw(+);
use LWP::RobotUA;

use WWW::RobotRules;
use URI::URL qw(url);

my $robruls = new WWW::RobotRules 'some.Robot';
my $ua = new LWP::RobotUA 'some.Robot', 'geo@moreinfo.com.au', $robruls;
$ua->delay(2/60);

my $request = new HTTP::Request('HEAD',
url('http://www.moreinfo.com.au/avs/'));
my $response = $ua->simple_request($request);

if ($response->is_error) {
	die("Unable access initial url");
	}

print "Successful completion";

---------------------------------

--
George Bray (geo@moreinfo.com.au) Phone +61 2 9484 9922  Fax +61 2 9980 7736
MoreInfo Internet Publishing, Sydney Australia  http://www.moreinfo.com.au