Skip Menu |

This queue is for tickets about the WWW-Mechanize-Timed CPAN distribution.

Report information
The Basics
Id: 32836
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-Timed

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

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



Subject: Possible zero values returned from client_response_server_time
This is actually a bug with LWPx::TimedHTTP. However, the testcase t/simple.t was highlighting the problem: http://rt.cpan.org//Ticket/Display.html?id=32835 This patch is to ensure that the testcases do not fail if the returned value is 0. The error seen was: Argument "0, 0.00263" isn't numeric in addition (+) at lib/WWW/Mechanize/Timed.pm line 54. So, while waiting for LWPx::TimedHTTP to be updated, you may want to add a s/,.*// in the client_response_server_time method.
Subject: WWW-Mechanize-Timed_possible_zero_values.patch
diff -ur WWW-Mechanize-Timed-0.43.original/t/simple.t WWW-Mechanize-Timed-0.43/t/simple.t --- WWW-Mechanize-Timed-0.43.original/t/simple.t 2007-08-03 21:14:26.000000000 +0100 +++ WWW-Mechanize-Timed-0.43/t/simple.t 2008-01-31 13:58:25.000000000 +0000 @@ -12,10 +12,10 @@ $ua->get("http://www.astray.com/"); my ( $a, $b, $c, $d ); -ok( $a = $ua->client_request_connect_time ); -ok( $b = $ua->client_request_transmit_time ); -ok( $c = $ua->client_response_server_time ); -ok( $d = $ua->client_response_receive_time ); +ok( defined ($a = $ua->client_request_connect_time) ); +ok( defined ($b = $ua->client_request_transmit_time) ); +ok( defined ($c = $ua->client_response_server_time) ); +ok( defined ($d = $ua->client_response_receive_time) ); cmp_ok( $ua->client_total_time, '==', $a + $b + $c + $d,
Thanks, this is fixed in version 0.44, which just hit CPAN.