Subject: | Error in passing parameters |
Date: | Thu, 13 Aug 2015 16:13:34 +0000 |
To: | "bug-LWP-UserAgent-ExponentialBackoff [...] rt.cpan.org" <bug-LWP-UserAgent-ExponentialBackoff [...] rt.cpan.org> |
From: | Chuck Boeheim <chuck.boeheim [...] cornell.edu> |
There is an error in this class passing parameters to its superclass.
It attempts to pass @_, which still contains arguments that the
superclass does not understand. I believe this should correct
the problem.
*** ExponentialBackoff.pm~ Fri Jul 29 09:44:45 2011
--- ExponentialBackoff.pm Thu Aug 13 10:16:23 2015
***************
*** 22,28 ****
$tolerance = .20 unless defined $tolerance;
my $failCodes = delete $cnf{failCodes};
$failCodes = { map { $_ => $_ } @FAILCODES } unless defined $failCodes;
! my $self = $class->SUPER::new(@_);
$self = bless {
%{$self},
sum => $sum,
--- 22,28 ----
$tolerance = .20 unless defined $tolerance;
my $failCodes = delete $cnf{failCodes};
$failCodes = { map { $_ => $_ } @FAILCODES } unless defined $failCodes;
! my $self = $class->SUPER::new(%cnf);
$self = bless {
%{$self},
sum => $sum,
-Chuck
--
Chuck Boeheim [::] CIT [::] Messaging and Collaboration
Anything can be accomplished given sufficient caffeine