Skip Menu |

This queue is for tickets about the LWP-UserAgent-Determined CPAN distribution.

Report information
The Basics
Id: 41508
Status: resolved
Priority: 0/
Queue: LWP-UserAgent-Determined

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.03
Fixed in: (no value)



Subject: Broken by libwww-5.822
As the subject line says. Downgrading to libwww 5.821 fixes. Upgrading to 5.822 breaks the 10_determined test as here: t/10_determined_test....Undefined subroutine &LWP::Debug::trace called at /home/sand/.cpan/build/LWP-UserAgent-Determined-1.03-V2rKF_/blib/lib/LWP/UserAgent/Determined.pm line 21. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 10/11 subtests I have no idea who should adjust code, I have only a smoker running that found the dependency relation. Cheers,
Show quoted text
> Downgrading to libwww 5.821 fixes. Upgrading to 5.822 breaks the > 10_determined test as here:
Indeep, LWP 5.822 breaks the module entirely, as it removes all functions in the LWP::Debug namespace without warning. The attached patch removes the calls to functions in LWP::Debug:: - Alex
Failure to actually attach the patch. Take two! - Alex
diff -ru LWP-UserAgent-Determined-1.03-orig/lib/LWP/UserAgent/Determined.pm LWP-UserAgent-Determined-1.03/lib/LWP/UserAgent/Determined.pm --- LWP-UserAgent-Determined-1.03-orig/lib/LWP/UserAgent/Determined.pm 2004-04-09 03:10:07.000000000 -0400 +++ LWP-UserAgent-Determined-1.03/lib/LWP/UserAgent/Determined.pm 2008-12-29 20:29:51.000000000 -0500 @@ -1,12 +1,11 @@ package LWP::UserAgent::Determined; # Time-stamp: "2004-04-08 23:10:07 ADT" POD is at the end. -$VERSION = '1.03'; +$VERSION = '1.04'; use LWP::UserAgent (); @ISA = ('LWP::UserAgent'); use strict; -use LWP::Debug (); die "Where's _elem?!!?" unless __PACKAGE__->can('_elem'); sub timing { shift->_elem('timing' , @_) } @@ -18,18 +17,14 @@ sub simple_request { my($self, @args) = @_; - LWP::Debug::trace('simple_request()'); my(@timing_tries) = ( $self->timing() =~ m<(\d+(?:\.\d+)*)>g ); my $determination = $self->codes_to_determinate(); - LWP::Debug::debug("My retrial code policy is [" . join(' ', sort keys %$determination) . "]."); - LWP::Debug::debug("My retrial timing policy is [@timing_tries]."); my $resp; my $before_c = $self->before_determined_callback; my $after_c = $self->after_determined_callback; foreach my $pause_if_unsuccessful (@timing_tries, undef) { - LWP::Debug::debug("Trying simple_request with args: [" . join(',', map $_||"''", @args) . "]"); $before_c and $before_c->( @@ -42,15 +37,11 @@ my $message = $resp->message; $message =~ s/\s+$//s; unless( $determination->{$code} ) { # normal case: all is well (or 404, etc) - LWP::Debug::debug("It returned a code ($code $message) blocking a retry"); return $resp; } if(defined $pause_if_unsuccessful) { # it's undef only on the last - LWP::Debug::debug("It returned a code ($code $message) that'll make me retry, after $pause_if_unsuccessful seconds."); sleep $pause_if_unsuccessful if $pause_if_unsuccessful; - } else { - LWP::Debug::debug("I give up. I'm returning this \"$code $message\" response."); } } Only in LWP-UserAgent-Determined-1.03: Makefile diff -ru LWP-UserAgent-Determined-1.03-orig/META.yml LWP-UserAgent-Determined-1.03/META.yml --- LWP-UserAgent-Determined-1.03-orig/META.yml 2004-04-09 03:11:07.000000000 -0400 +++ LWP-UserAgent-Determined-1.03/META.yml 2008-12-29 20:30:12.000000000 -0500 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: LWP-UserAgent-Determined -version: 1.03 +version: 1.04 version_from: lib/LWP/UserAgent/Determined.pm installdirs: site requires:
On Mon Dec 29 20:42:14 2008, ALEXMV wrote: Show quoted text
> Failure to actually attach the patch. Take two!
..and failed to test it, either. *sigh* Take three, attached. - Alex
Only in LWP-UserAgent-Determined-1.03: blib diff -ru LWP-UserAgent-Determined-1.03-orig/lib/LWP/UserAgent/Determined.pm LWP-UserAgent-Determined-1.03/lib/LWP/UserAgent/Determined.pm --- LWP-UserAgent-Determined-1.03-orig/lib/LWP/UserAgent/Determined.pm 2004-04-09 03:10:07.000000000 -0400 +++ LWP-UserAgent-Determined-1.03/lib/LWP/UserAgent/Determined.pm 2008-12-29 20:45:24.000000000 -0500 @@ -1,12 +1,11 @@ package LWP::UserAgent::Determined; # Time-stamp: "2004-04-08 23:10:07 ADT" POD is at the end. -$VERSION = '1.03'; +$VERSION = '1.04'; use LWP::UserAgent (); @ISA = ('LWP::UserAgent'); use strict; -use LWP::Debug (); die "Where's _elem?!!?" unless __PACKAGE__->can('_elem'); sub timing { shift->_elem('timing' , @_) } @@ -18,19 +17,13 @@ sub simple_request { my($self, @args) = @_; - LWP::Debug::trace('simple_request()'); my(@timing_tries) = ( $self->timing() =~ m<(\d+(?:\.\d+)*)>g ); my $determination = $self->codes_to_determinate(); - LWP::Debug::debug("My retrial code policy is [" - . join(' ', sort keys %$determination) . "]."); - LWP::Debug::debug("My retrial timing policy is [@timing_tries]."); my $resp; my $before_c = $self->before_determined_callback; my $after_c = $self->after_determined_callback; foreach my $pause_if_unsuccessful (@timing_tries, undef) { - LWP::Debug::debug("Trying simple_request with args: [" - . join(',', map $_||"''", @args) . "]"); $before_c and $before_c->( $self, \@timing_tries, $pause_if_unsuccessful, $determination, \@args); @@ -42,15 +35,11 @@ my $message = $resp->message; $message =~ s/\s+$//s; unless( $determination->{$code} ) { # normal case: all is well (or 404, etc) - LWP::Debug::debug("It returned a code ($code $message) blocking a retry"); return $resp; } if(defined $pause_if_unsuccessful) { # it's undef only on the last - LWP::Debug::debug("It returned a code ($code $message) that'll make me retry, after $pause_if_unsuccessful seconds."); sleep $pause_if_unsuccessful if $pause_if_unsuccessful; - } else { - LWP::Debug::debug("I give up. I'm returning this \"$code $message\" response."); } } Only in LWP-UserAgent-Determined-1.03: Makefile diff -ru LWP-UserAgent-Determined-1.03-orig/META.yml LWP-UserAgent-Determined-1.03/META.yml --- LWP-UserAgent-Determined-1.03-orig/META.yml 2004-04-09 03:11:07.000000000 -0400 +++ LWP-UserAgent-Determined-1.03/META.yml 2008-12-29 20:30:12.000000000 -0500 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: LWP-UserAgent-Determined -version: 1.03 +version: 1.04 version_from: lib/LWP/UserAgent/Determined.pm installdirs: site requires: Only in LWP-UserAgent-Determined-1.03: pm_to_blib
This is resolved by today's update to 1.04