Subject: | RobotUA constructor ignores delay, use_sleep |
According to LWP::RobotUA's docs, "delay" and "use_sleep" should
initialize the UA's initial attributes. The values are extracted from
the given options, but not used. Fix attached.
Subject: | robotua-constructor.patch |
Index: lib/LWP/RobotUA.pm
===================================================================
RCS file: /cvsroot/libwww-perl/lwp5/lib/LWP/RobotUA.pm,v
retrieving revision 1.27
diff -u -r1.27 RobotUA.pm
--- lib/LWP/RobotUA.pm 6 Apr 2004 13:14:37 -0000 1.27
+++ lib/LWP/RobotUA.pm 30 Aug 2006 22:37:58 -0000
@@ -50,8 +50,8 @@
my $self = LWP::UserAgent->new(%cnf);
$self = bless $self, $class;
- $self->{'delay'} = 1; # minutes
- $self->{'use_sleep'} = 1;
+ $self->{'delay'} = $delay; # minutes
+ $self->{'use_sleep'} = $use_sleep;
if ($rules) {
$rules->agent($cnf{agent});