in reply to POE::Wheel::Run and StdoutEvent

Someone from the POE mailing list pointed out the problem: The wheel goes out of scope. Making $w a global seems to fix the problem.

Replies are listed 'Best First'.
Re^2: POE::Wheel::Run and StdoutEvent
by rcaputo (Chaplain) on Jun 06, 2006 at 05:24 UTC

    A better solution would be to store the wheel object in the session's heap, since wheels are tightly coupled to their sessions.

      By using:

      $_HEAP->{theWheel} = POE::Wheel::Run->new(...)

      The console print is captured, but the app hangs and never returns. Is it normal for POE to still run after the subroutine has slept and is over ?

      I just looked at the preview of this reply and the msg formatter prints the HEAP var in a funny manner.

        Wrap your code in <code></code> tags.