I've been googling for 10-15 minutes but haven't found any real answer. So, anyone can tell me what's the deal with timeout in IO::Socket::INET? The timeout-related code in INET.pm has been commented probably since 5.6.x. Are we supposed to use alarm() now? It's a bit awkward since my daemon also needs to do some heavy work which I don't want to be trapped by alarm. But I want short timeout for sockets. My own protocol is chatty, so I have $blah = <$sock> sprinkled in many places, do I have to wrap each one of those with alarm?
O wisdomy ones, please enlighten me.