1 package PerlIO::scalar;
4 XSLoader::load 'PerlIO::scalar';
10 PerlIO::scalar - in-memory IO, scalar IO
16 open my $fh, "<", \$scalar or die;
17 open my $fh, ">", \$scalar or die;
18 open my $fh, ">>", \$scalar or die;
24 open my $fh, "<:scalar", \$scalar or die;
25 open my $fh, ">:scalar", \$scalar or die;
26 open my $fh, ">>:scalar", \$scalar or die;
30 A filehandle is opened but the file operations are performed "in-memory"
31 on a scalar variable. All the normal file operations can be performed
32 on the handle. The scalar is considered a stream of bytes. Currently
33 fileno($fh) returns -1.
35 =head1 IMPLEMENTATION NOTE
37 C<PerlIO::scalar> only exists to use XSLoader to load C code that
38 provides support for treating a scalar as an "in memory" file.
39 One does not need to explicitly C<use PerlIO::scalar>.