On Wed, Jul 15, 2009 at 04:08:48AM -0400, Rocco Caputo wrote: > For starters, $_[ARG0] isn't guaranteed to contain anything in particular.
Well, it's guaranteed to contain whatever was passed as the 'args' argument to the POE::Session constructor, right? When the session is constructed, 'args' is [ $socket, $client_args ]. That 'args' value needs to remain, because the POE::Wheel::ReadWrite constructor needs it. Having ClientConnected then mirror _start in terms of arguments seems reasonable. > I think you're almost right. The correct behavior would be for > ClientArgs to align with @_[ARG0..$#_]. This still breaks current code, > but it's cleaner. Well, I don't mind breaking old code, but I think ARG0 being the socket should be preserved. Reaching into $heap->{client}->get_input_handle seems awkward. Then again, perhaps it's breaking an abstraction to have direct access to the socket outside of POE::Wheel::ReadWrite. The code I have that actually needs it would benefit from the clarity of having the socket passed as ARG0. Whether or not this breaks some possible future change in something... -- Michael Fowler www.shoebox.net