Building notes, projects, and occasional rants

IO::All is evil

So I was reading IO::All documentation. It seems pretty powerfull and can save me some time whenever I need to read text and parse it.

Until I came to this:

    A Tiny Web Server

       Here is how you could write a simplistic web server that works with
       static and dynamic pages:

       perl -MIO::All -e 'io(":8080")->fork->accept->(sub { $_[0] < io(-x $1 ? "./$1 |" : $1) if  /^GET \/(.*) / })'

No, I won’t tell you how it works. I had to read the explanation three times to understand it all. See for yourself in the IO::All perldoc.