summaryrefslogtreecommitdiff
path: root/lib/PerlIO.pm
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-07-11 09:16:46 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-07-11 09:16:46 +0000
commit4ec2216f20a53a69267b31ce136e7410687cbe32 (patch)
tree96c95cc2bb9e43f5cfb7a60f65657db028a051da /lib/PerlIO.pm
parent81428673dc5737b28b793d38fc79696f8d6e80c4 (diff)
downloadperl-4ec2216f20a53a69267b31ce136e7410687cbe32.tar.gz
(Re-)instate :pop as a "back door" to perl level layer stack
manipulation. p4raw-id: //depot/perlio@17479
Diffstat (limited to 'lib/PerlIO.pm')
-rw-r--r--lib/PerlIO.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/PerlIO.pm b/lib/PerlIO.pm
index 1028c11013..1ee5b88815 100644
--- a/lib/PerlIO.pm
+++ b/lib/PerlIO.pm
@@ -133,6 +133,22 @@ a known base on which to build e.g.
will construct a "binary" stream, but then enable UTF-8 translation.
+=item pop
+
+A pseudo layer that removes the top-most layer. Gives perl code
+a way to manipulate the layer stack. Should be considered
+as experimental. Note that C<:pop> only works on real layers
+and will not undo the effects of pseudo layers like C<:utf8>.
+An example of a possible use might be:
+
+ open($fh,...)
+ ...
+ binmode($fh,":encoding(...)"); # next chunk is encoded
+ ...
+ binmode($fh,":pop"); # back to un-encocded
+
+A more elegant (and safer) interface is needed.
+
=back
=head2 Alternatives to raw