"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tlperl/lib/PerlIO/scalar.pm" (7 Mar 2020, 959 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 package PerlIO::scalar;
    2 our $VERSION = '0.30';
    3 require XSLoader;
    4 XSLoader::load();
    5 1;
    6 __END__
    7 
    8 =head1 NAME
    9 
   10 PerlIO::scalar - in-memory IO, scalar IO
   11 
   12 =head1 SYNOPSIS
   13 
   14    my $scalar = '';
   15    ...
   16    open my $fh, "<",  \$scalar or die;
   17    open my $fh, ">",  \$scalar or die;
   18    open my $fh, ">>", \$scalar or die;
   19 
   20 or
   21 
   22    my $scalar = '';
   23    ...
   24    open my $fh, "<:scalar",  \$scalar or die;
   25    open my $fh, ">:scalar",  \$scalar or die;
   26    open my $fh, ">>:scalar", \$scalar or die;
   27 
   28 =head1 DESCRIPTION
   29 
   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.
   34 
   35 =head1 IMPLEMENTATION NOTE
   36 
   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>.
   40 
   41 =cut