There is an ongoing outage on the primary CPAN mirror. It is possible to work around the issue by using MetaCPAN as a mirror.

NAME

PerlIO::via::Timeout::Strategy::Alarm - a PerlIO::via::Timeout strategy that uses Time::Out (based on alarm)

VERSION

version 0.14

SYNOPSIS

use PerlIO::via::Timeout qw(timeout_strategy);
binmode($fh, ':via(Timeout)');
timeout_strategy($fh, 'Alarm', read_timeout => 0.5);

DESCRIPTION

This class implements a timeout strategy to be used by PerlIO::via::Timeout.

Timeout is implemented using the Time::Out, which uses the alarm core function, but with a safe harness.

METHODS

new

Constructor of the strategy. Takes as arguments a list of key / values :

read_timeout

The read timeout in second. Can be a float

write_timeout

The write timeout in second. Can be a float

timeout_enabled

Boolean. Defaults to 1

COMPATIBILITY

Doesn't work on Windows

SEE ALSO

PerlIO::via::Timeout

AUTHOR

Damien "dams" Krotkine

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Damien "dams" Krotkine.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.