I've been making good progress on Reflex lately. I have to: I've applied to talk about it at YAPC::NA, so I need something to talk about! The code has been moving too fast for CPAN right now, but you can follow along at Reflex's repository on github. Here's a summary of the latest changes:
I've added support for as many callback mechanisms as I could think of, including one I'm not sure existed before. Callback consumers (the things being called back into) decide the kinds of callbacks they prefer. Objects doing the calling use a single, consistent method: emit(). Reflex handles the rest. The callback types supported so far:
There's even an example that runs with every supported callback type at once. Just because it can!
I've also implemented a few classes that support TCP (and maybe UNIX) clients and servers.
Reflex::Listener is a base class for connection-based servers. Give it an IO::Socket, and it will listen() for and accept() client connections. It also extends Reflex::Handle. See TcpEchoServer in this example.
Reflex::Connector is the other side of the connection-based client/server dialog. It will perform a non-blocking connect() on the IO::Socket you provide. Eventually it'll return that socket in its connected state, or notify you of failure. Reflex::Connector also extends Reflex::Handle. Reflex::Client (below) uses it.
And Reflex::Collection is a small object manager. The TcpEchoServer uses it to automatically clean up client objects when they disconnect. This is another common and tedious task that Reflex automates.
Still to do: Document and release all this new goodness, then (presuming it's accepted) write my talk! I hope to see you at YAPC::NA either way.