RETURN VALUE

Time::HiRes

If Time::Out sees that Time::HiRes has been loaded, it will use that 'alarm' function (if available) instead of the default one, allowing float timeout values to be used effectively:

use Time::Out ;
use Time::HiRes ;
timeout 3.1416 => sub {
# ...
} ;

BUGS

Blocking I/O on MSWin32

alarm(2) doesn't interrupt blocking I/O on MSWin32, so 'timeout' won't do that either.

@_

One drawback to using 'timeout' is that it masks @_ in the affected code. This happens because the affected code is actually wrapped inside another subroutine that provides it's own @_. You can get around this by specifically passing your @_ (or whatever you want for that matter) to 'timeout' as such:

As a valued partner and proud supporter of MetaCPAN, StickerYou is
happy to offer a 10% discount on all Custom Stickers,
Business Labels, Roll Labels,
Vinyl Lettering or Custom Decals. StickerYou.com
is your one-stop shop to make your business stick.
Use code METACPAN10 at checkout to apply your discount.