Skip Menu |
 

This queue is for tickets about the IO-All-LWP CPAN distribution.

Report information
The Basics
Id: 122683
Status: new
Priority: 0/
Queue: IO-All-LWP

People
Owner: Nobody in particular
Requestors: shmem [...] cruft.de
Cc:
AdminCc:

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



Subject: IO::All::LWP doesn't warn on failures
Date: Wed, 2 Aug 2017 09:39:56 +0200 (CEST)
To: bug-IO-All-LWP [...] rt.cpan.org
From: shmem <shmem [...] cruft.de>
Download (untitled) / with headers
text/plain 862b
The get/sub methods should at least warn on failures (i.e. a return code greater than 200). Currently both methods ignore the response. The patch below fixes this. IO::All version 0.14 ---8<--- --- /usr/share/perl5/IO/All/LWP.pm 2007-03-29 09:31:05.000000000 +0200 +++ Devel/IO/All/LWP.pm 2017-08-02 09:33:01.489495128 +0200 @@ -72,7 +72,9 @@ sub request { my $self = shift; - $self->response($self->ua->request(shift)); + my $response = $self->response($self->ua->request(shift)); + warn $response->message if $response->code > 200; + $response; } sub open { ---8<--- best regards, 0--gg- -- _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.