in reply to Adding sessions on-the-fly to POE program

I thought that sessions with no name/alias and no further tasks pending quit. So the one session capable of handling a irc_001 message should have already exited by the time that message is thrown. I think your _start method will have to give the session a name so it will hang around to handle the irc_001 message.
  • Comment on Re: Adding sessions on-the-fly to POE program

Replies are listed 'Best First'.
Re^2: Adding sessions on-the-fly to POE program
by revdiablo (Prior) on Oct 27, 2004 at 16:38 UTC
    I thought that sessions with no name/alias and no further tasks pending quit.

    POE::Component::IRC's register state increments the refcount on the calling session, which would also have kept it alive also. japhy's only problem was that he posted register from the POE::Component::Server::TCP session, so the events (and the refcount increment) were going there instead.

    PS: I know this is a bit after the fact and a bit off-topic, but I figure the more we talk about POE the better. The Monastery seems to have a dearth of discussion about POE, which I think is a shame.

Re^2: Adding sessions on-the-fly to POE program
by japhy (Canon) on Oct 26, 2004 at 20:34 UTC
    Hmm, no, that doesn't help. The problem I'm encountering is this: if I create a POE::Component::IRC object after I've created the POE::Session object, it doesn't interact.
    _____________________________________________________
    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart