sub factory_success { my( $handle, $wheel_id ) = @_[ARG0, ARG1]; $_[HEAP]->{clients}->{ $wheel_id } = POE::Wheel::ReadWrite->new( Handle => $handle, Driver => POE::Driver::SysRW->new(), Filter => POE::Filter::SimpleQueryString->new(), InputEvent => 'client_input', ); print "factory_success called, creating wheel $wheel_id for handle $handle\n"; } #### sub input_state { my ($heap, $input, $wheel_id) = @_[HEAP, ARG0, ARG1]; print "Echoing input from wheel $wheel_id: $input\n"; $heap->{wheel}->put($input); # Echo it back. }