in reply to POE: multiple event handlers

(Edit: Found POE_Cookbook answer.)

I deleted my initial idea; I don't think it would have worked.

Check out http://poe.perl.org/?POE_Cookbook/Broadcasting_Events. The event registry approach looks like it's what you need.

If you come up with a cool solution, please follow up to your node. I'm looking forward to seeing the correct solution.


Mike

Replies are listed 'Best First'.
Re^2: POE: multiple event handlers
by johnnywang (Priest) on Apr 12, 2005 at 17:20 UTC
    Broadcasting solves a slightly different problem, namely sending the same event to all sessions. My problem is to have multiple event-handlers within the same session, so I can call yield() and still got handler multiple times. One hack is to re-send multiple events, but that's ugly.