in reply to Re^2: POE::IRC, Where was that tall building again?
in thread POE::IRC, Where was that tall building again?
That's the thing: there isn't anything inside of POE itself to tie any random pair of events together. It's not that you're unclear; more that I'm explaining it poorly and it requires you to have an "Aha!" moment and get your head thinking the POE-y state machine way. Let's try this:
Your sessions are what's responsible for maintaining state (most cleanly through declaring object_states which will be called as methods on an instance; see Using POE::Session With Objects; alternately you can stash things in the session's private $_[HEAP] if you don't want to make a separate class). Your session instances maintain any context or state information (maybe by doing push @{$self->{pending_who_requests}}, $channel) and then alter their state accordingly as events warrant (removing an entry from that pending list and firing off an event back to the requesting session (or the same session) with the processed who information when it receives the reply event to a given request).
Update: Added mention of $_[HEAP] to parenthetical.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|