Poincare has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a module for IRC just for learning about sockets and perl in general. I have 200 lines of working code. Now, I am getting to a point where I am writing a who() function and I realise that I need receive while sending. I asked on #perl on freenode and they directed me to POE. Can I implement POE without changing all my code which is based on IO::Socket::INET? If so, how can I do it? If not, what else can I do?

Replies are listed 'Best First'.
Re: POE with IO::Socket
by rcaputo (Chaplain) on Nov 01, 2009 at 03:36 UTC

    It's really hard to answer this without seeing your code. POE::Kernel has low-level methods that work very much like portable versions of IO::Select. If your code can be revised to work with IO::Select, then it should be about as easy to migrate to POE. See IO::Select and POE::Kernel's select_read() method. This tutorial walks the uninitiated through IO::Select and POE analogs, some of which are much higher level than IO::Select. I have little to no idea whether it applies in your case, however.