ingydotnet/io-all-pm — pull request #43 by wchristian (2014-03-21 15:20:50+00:00)
Title: RFC: proper io layers

This is at this point less of a pull request and more of an RFC, mainly due to the fact that some of the changes might be compatibility-breaking and the whole thing still needs updates to the documentation.

The most important change is that encoding(0) doesn't work anymore, as there is no such IO layer. The only way that could be implemented is by having it grep through the layers array and remove all encodings layers, which potentially might not have the same end result as far as io layer configuration goes.

Additionally, calling ->_utf8 to check whether flag is set does not work anymore, for now, out of laziness, i changed it into a grep, which is actually pointless, since it will also return 1 for `[':encoding(UTF-8)', ':raw']`. Either we deprecate that, or i implement something with PerlIO::get_layers, or even PerlIO::Layers.

I should probably also condense the layer application into a join. Might be slightly unstable in case people do dumb stuff, but will probably speed things up a bit.