Subject: | IO::Socket->connected raises warning if socket doesn't yet have a filehandle |
Create a new IO::Socket without yet a filehandle inside it.
->connected accessor throws a warning:
getpeername() on unopened socket GEN1 at
/usr/lib/perl/5.10/IO/Socket.pm line 257.
This accessor can be easily fixed by testing if it's even open first;
perhaps by checking
defined fileno($sock) and getpeername($sock);
--
Paul Evans