This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Text::ParseWords 3.27
[perl5.git] / lib / PerlIO.pm
index b3693c9..1b80507 100644 (file)
@@ -1,6 +1,6 @@
 package PerlIO;
 
-our $VERSION = '1.03';
+our $VERSION = '1.05';
 
 # Map layer name to package that defines it
 our %alias;
@@ -35,7 +35,7 @@ PerlIO - On demand loader for PerlIO layers and root of PerlIO::* name space
 
 =head1 SYNOPSIS
 
-  open($fh,"<:crlf", "my.txt"); # portably open a text file for reading
+  open($fh,"<:crlf", "my.txt"); # support platform-native and CRLF text files
 
   open($fh,"<","his.jpg");      # portably open a binary file for reading
   binmode($fh);
@@ -121,7 +121,7 @@ The C<:mmap> layer will not exist if platform does not support C<mmap()>.
 
 =item :utf8
 
-Declares that the stream accepts perl's internal encoding of
+Declares that the stream accepts perl's I<internal> encoding of
 characters.  (Which really is UTF-8 on ASCII machines, but is
 UTF-EBCDIC on EBCDIC machines.)  This allows any character perl can
 represent to be read from or written to the stream. The UTF-X encoding
@@ -139,6 +139,10 @@ and then read it back in.
        $in = <F>;
        close(F);
 
+Note that this layer does not validate byte sequences. For reading
+input, using C<:encoding(utf8)> instead of bare C<:utf8>, is strongly
+recommended.
+
 =item :bytes
 
 This is the inverse of C<:utf8> layer. It turns off the flag
@@ -188,7 +192,7 @@ An example of a possible use might be:
     ...
     binmode($fh,":encoding(...)");  # next chunk is encoded
     ...
-    binmode($fh,":pop");            # back to un-encocded
+    binmode($fh,":pop");            # back to un-encoded
 
 A more elegant (and safer) interface is needed.
 
@@ -288,7 +292,7 @@ The following table summarizes the default layers on UNIX-like and
 DOS-like platforms and depending on the setting of the C<$ENV{PERLIO}>:
 
  PERLIO     UNIX-like                   DOS-like
+ ------     ---------                   --------
  unset / "" unix perlio / stdio [1]     unix crlf
  stdio      unix perlio / stdio [1]     stdio
  perlio     unix perlio                 unix perlio
@@ -338,4 +342,3 @@ L<perlfunc/"binmode">, L<perlfunc/"open">, L<perlunicode>, L<perliol>,
 L<Encode>
 
 =cut
-