Subject: | IO::Handle blocking always fails in windows |
In module IO::Handle using strawberry perl v5.10.0 on Windows 7 64 bit OS,
$io->blocking(0) always fails with $! set to "Unknown error"
Sample code to produce the bug is attached
Subject: | timeout.pl |
#!/usr/bin/perl
use strict;
use warnings;
use IO::File;
print $! if(!STDIN->blocking(0)) ;
$_ = <STDIN>;
if(defined) {
print "You were quick";
exit;
}
sleep 5;
$_ = <STDIN>;
if(defined)
{
print "Atleast you can type";
exit;
}
print "You are totally useless";