On Fri, Mar 09, 2001 at 10:05:50PM -0800, Peter Scott wrote:
> Why does POE::Wheel::ReadWrite insist on having both input and output 
> filehandles?  I want something to fire off an event when input is received, 
> I don't care about output.  If I read wheels2.perl correctly, it seems to 
> be doing that too - it looks as though it's not using the STDOUT that's 
> stuck in the new().

It's a long story.  Here's a brief synopsis.

Handle came first.

When a ReadWrite wheel interacts with a single filehandle, it's
specified as Handle.  For read-only versions, omit a FlushedState
event and don't call put().  It's still possible to put() through a
ReadWrite wheel without a FlushedState event.

InputHandle and OutputHandle were added later.

When a ReadWrite wheel needs to work with separate input and output
filehandles, they're specified separately in InputHandle and
OutputHandle.  The underlying read/write logic is the same.

Truly separate handles might come later.

It's possible to support InputHandle without OutputHandle, or vice
versa, but it would add to ReadWrite's complexity.  I'll be happy to
include a patch if you can make it work without a runtime performance
penalty.  Otherwise I'll get to it when I can.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net

Reply via email to