Skip Menu |

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

Report information
The Basics
Id: 115809
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: Calling context not handled properly
The following test script fails: #!perl use strict; use Test::More 'no_plan'; use Time::Out 'timeout'; my $sub = sub { wantarray ? 'array' : 'scalar'; }; { my $ret = $sub->(); is $ret, 'scalar'; } { my $ret = timeout 100 => $sub; is $ret, 'scalar'; # array is returned here } __END__ Probably the wantarray check has to be done within timeout()'s eval block, where $code is executed, because here the calling context has to be set correctly.