Re: POE with IO::Socket



On Sat, 31 Oct 2009 23:24:15 -0400, Someone Something wrote:

Firstly, I have posted this in perlmonks. No one has replied to me so, I
have posted here.
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?

No, you'll have to change pretty much all of it. Some of the "business
logic" layer will survive.

POE is a radically different way of thinking compared to what you have
been doing. It is totally asynchronous and event-driven. But it is
immensely powerful. Once you invest the time to learn it you will be able
to do projects like the one you are engaged in much faster.

Rewriting 200 lines should not take much time at all.

--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
.



Relevant Pages

  • Re: POE with IO::Socket
    ... I have 200 lines of working code. ... where I am writing a whofunction and I realise that I need receive ... 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 ...
    (perl.beginners)
  • POE with IO::Socket
    ... I have 200 lines of working code. ... where I am writing a whofunction and I realise that I need receive while ... I asked on #perl on freenode and they directed me to POE. ...
    (perl.beginners)
  • Re: Some Advice.
    ... Practice, practice. ... really need that much math to learn to program. ... > for an algorithm but writing a program is more like writing a good paper ... No comment, I don't know Perl. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Newbie Question...
    ... them for writing, they are automatically clobbered. ... > complains that it cannot close the first outputfile ... > of Perl, but what am I doing wrong with the script??? ... Can you do a recursive directory search in perl without ...
    (comp.lang.perl.misc)
  • Re: (1)[0] ok but not 1[0]
    ... FK> I think I'll be writing for some weeks, ... FK> "Programming Perl" and http://perldoc.perl.org/. ... there are dozens of perl tutorials on the net ...
    (comp.lang.perl.misc)