Filewatcher File Search File Search
Content Search
» » » » » »


Emulate file interface for in-core strings

The "IO::String" module provides the "IO::File" interface for in-core strings. An "IO::String" object can be attached to a string, and makes it possible to use the normal file operations for reading or writing data, as well as for seeking to various locations of the string. This is useful when you want to use a library module that only provides an interface to file handles on data that you have in a string variable.

Note that perl-5.8 and better has built-in support for "in memory" files, which are set up by passing a reference instead of a filename to the open() call. The reason for using this module is that it makes the code backwards compatible with older versions of Perl.

Package version:1.08


IO::String is an IO::File (and IO::Handle) compatible class that read
or write data from in-core strings.  It is really just a
simplification of what I needed from Eryq's IO-stringy modules.  As
such IO::String is a replacement for IO::Scalar.

Installation as usual:

   perl Makefile.PL
   make test
   make install

Documentation is embedded in the module.

Copyright 1998-2005 Gisle Aas.


String(3)        User Contributed Perl Documentation       String(3)

       IO::String - Emulate file interface for in-core strings

        use IO::String;
        $io = IO::String->new;
        $io = IO::String->new($var);
        tie *IO, 'IO::String';

        # read data
        read($io, $buf, 100);

        # write data
        print $io


2005-12-05   Gisle Aas <>

   Release 1.08

   The untie code in close() just seemed wrong, so just
   remove it.  The object still seems to get cleaned up
   on various versions perl.

2005-10-24   Gisle Aas <>

   Release 1.07

   Make sure read() will not return negative values.

2004-11-05   Gis

Browse inside perl-IO-String-1.08-9.el6.noarch.rpm

1.32 KB2014-11-28HEADER  view  50 mirrors
         [DIR]usr/ (1)  65535+ mirrors

Download perl-IO-String-1.08-9.el6.noarch.rpm

Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017