package PerlIO;
-our $VERSION = '1.02';
+our $VERSION = '1.04';
# Map layer name to package that defines it
our %alias;
=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);
...
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.
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
The arguments to layers are by default returned in parenthesis after
the name of the layer, and certain layers (like C<utf8>) are not real
layers but instead flags on real layers: to get all of these returned
-separately use the optional C<separate> argument:
+separately use the optional C<details> argument:
my @layer_and_args_and_flags = PerlIO::get_layers($fh, details => 1);
L<Encode>
=cut
-