IPC?

Michael G Schwern schwern at pobox.com
Sat Nov 17 21:19:36 CST 2001


On Sun, Nov 18, 2001 at 02:43:30AM +0000, barry wrote:
> okay, been playing around with Net::ICQ2000 today, playing around
> with something that'll let me gateway between email and sms (and
> vice versa) I have the process able to send sms etc, and get
> messages back via sms or icq, however to get mail coming into it, I
> need it to be able to get data from another process, I was ponding
> using a named pipe to just shove the stuff into from elsewhere, but
> then there's the problem of a while(1) to keep the icq client doing
> stuff, and having to read from something else too, should I be using
> select()? or is there some other fun way of making two things talk I
> should be trying to look into?

I'd suggest threads, but then I'd have to suggest you wait for 5.8
when they work.

Basically, you need an event loop (aka cooperative multitasking) so
you can keep the IRC client going while processing the email.  Rather
than kludging one together with while/select, there's a host of
modules out there to do that.  The best of breed being POE.

It's vast size and scope, and somewhat odd terminology might be a
little daunting, but it is the absolute last word in Perl event
handling.


-- 

Michael G. Schwern   <schwern at pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa at perl.org>	       Kwalitee Is Job One



More information about the Belfast-pm mailing list