Skip Menu |

This queue is for tickets about the Time-Out CPAN distribution.

Report information
The Basics
Id: 100886
Status: new
Priority: 0/
Queue: Time-Out

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

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



Subject: use Time::HiRes and Time::Out order
In the sample code lines in Time::Out's Pod for using Time::HiRes together with Time::Out, the order of the use statements is wrong. "use Time::HiRes" has to happen before "use Time::Out", otherwise only int timeouts are used. Try the following sample code (suitable as a test script). If "use Time::HiRes" comes before "use Time::Out", then the test script passes. #!/usr/bin/perl use strict; use warnings; use Time::Out qw(timeout); use Time::HiRes; use Test::More 'no_plan'; timeout 0.1 => sub { sleep 1; }; if ($@) { pass "Timeout happened"; } else { fail "No timeout"; } __END__