package PerlIO;
+our $VERSION = '1.01';
+
# Map layer name to package that defines it
-my %alias = (encoding => 'Encode');
+our %alias;
sub import
{
=head1 DESCRIPTION
-When an undefined layer 'foo' is encountered in an C<open> or C<binmode> layer
-specification then C code performs the equivalent of:
+When an undefined layer 'foo' is encountered in an C<open> or
+C<binmode> layer specification then C code performs the equivalent of:
use PerlIO 'foo';
$in = <F>;
close(F);
+=item bytes
+
+This is the inverse of C<:utf8> layer. It turns off the flag
+on the layer below so that data read from it is considered to
+be "octets" i.e. characters in range 0..255 only. Likewise
+on output perl will warn if a "wide" character is written
+to a such a stream.
+
=item raw
A pseudo-layer which performs two functions (which is messy, but
-necessary to maintain compatibility with non-PerlIO builds of perl
+necessary to maintain compatibility with non-PerlIO builds of Perl
and their way things have been documented elsewhere).
Firstly it forces the file handle to be considered binary at that
-point in the layer stack,
+point in the layer stack, i.e. it turns off any CRLF translation.
Secondly in prevents the IO system seaching back before it in the
layer specification. Thus:
Forces the use of C<perlio> layer even if the platform default, or
C<use open> default is something else (such as ":encoding(iso-8859-7)")
-which would interfere with binary nature of the stream.
+(the C<:encoding> requires C<use Encode>) which would interfere with
+binary nature of the stream.
=back
=head2 Defaults and how to override them
-If the platform is MS-DOS like and normally does CRLF to "\n" translation
-for text files then the default layers are :
+If the platform is MS-DOS like and normally does CRLF to "\n"
+translation for text files then the default layers are :
unix crlf