It took me some time to digest that code, and I finally came up with my interpretation of that. I hope this helps many others who are on the same (average) level as me
I remember meaning to comment on this at the time, but then forgetting to.
Why you think your implementation is any clearer than mine?
For a start, prefixing method names with their package names is down right bizarre:
threads::async { ... } ->threads::detach;
Even though it appears to work in this case, it surely won't in most.
And why turn one simple line $out->send( $_ ) while <STDIN>; into into 3?
I'm totally inspired by your "nothing cannot be done in Perl" attitude.
Hm. Whilst it may be true that "nothing cannot be done in Perl", there are many things that I wouldn't even attempt in Perl.
More applicable is that anything that can be done using events, can be more simply and without "turning your program inside out", using threads.
And finally, I somehow doubt that you are quite as "average" as you make out. Using LocalPort => 0 shows knowledge of IO::Socket::INET that isn't even documented.
In reply to Re^5: Any event modules that support STDIN polling for Windows?
by BrowserUk
in thread Any event modules that support STDIN polling for Windows?
by KHLeow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |