{
    "mode": "perldoc",
    "parameter": "IO::Stringy",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/IO%3A%3AStringy/json",
    "generated": "2026-06-12T00:44:54Z",
    "synopsis": "IO::\n::AtomicFile   adpO  Write a file which is updated atomically     ERYQ\n::Lines        bdpO  I/O handle to read/write to array of lines   ERYQ\n::Scalar       RdpO  I/O handle to read/write to a string         ERYQ\n::ScalarArray  RdpO  I/O handle to read/write to array of scalars ERYQ\n::Wrap         RdpO  Wrap old-style FHs in standard OO interface  ERYQ\n::WrapTie      adpO  Tie your handles & retain full OO interface  ERYQ",
    "sections": {
        "NAME": {
            "content": "IO-stringy - I/O on in-core objects like strings and arrays\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "IO::\n::AtomicFile   adpO  Write a file which is updated atomically     ERYQ\n::Lines        bdpO  I/O handle to read/write to array of lines   ERYQ\n::Scalar       RdpO  I/O handle to read/write to a string         ERYQ\n::ScalarArray  RdpO  I/O handle to read/write to array of scalars ERYQ\n::Wrap         RdpO  Wrap old-style FHs in standard OO interface  ERYQ\n::WrapTie      adpO  Tie your handles & retain full OO interface  ERYQ\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This toolkit primarily provides modules for performing both traditional and object-oriented i/o)\non things *other* than normal filehandles; in particular, IO::Scalar, IO::ScalarArray, and\nIO::Lines.\n\nIn the more-traditional IO::Handle front, we have IO::AtomicFile which may be used to painlessly\ncreate files which are updated atomically.\n\nAnd in the \"this-may-prove-useful\" corner, we have IO::Wrap, whose exported wraphandle()\nfunction will clothe anything that's not a blessed object in an IO::Handle-like wrapper... so\nyou can just use OO syntax and stop worrying about whether your function's caller handed you a\nstring, a globref, or a FileHandle.\n",
            "subsections": []
        },
        "WARNINGS": {
            "content": "Perl's TIEHANDLE spec was incomplete prior to 5.00557; it was missing support for \"seek()\",\n\"tell()\", and \"eof()\". Attempting to use these functions with an IO::Scalar, IO::ScalarArray,\nIO::Lines, etc. will not work prior to 5.00557. None of the relevant methods will be invoked by\nPerl; and even worse, this kind of bug can lie dormant for a while. If you turn warnings on (via\n$^W or \"perl -w\"), and you see something like this...\n\nseek() on unopened file\n\n...then you are probably trying to use one of these functions on one of our IO:: classes with an\nold Perl. The remedy is to simply use the OO version; e.g.:\n\n$SH->seek(0,0);    ### GOOD: will work on any 5.005\nseek($SH,0,0);     ### WARNING: will only work on 5.00557 and beyond\n",
            "subsections": []
        },
        "INSTALLATION": {
            "content": "",
            "subsections": [
                {
                    "name": "Requirements",
                    "content": "As of version 2.x, this toolkit requires Perl 5.005 for the IO::Handle subclasses, and 5.00557\nor better is strongly recommended. See \"WARNINGS\" for details.\n"
                },
                {
                    "name": "Directions",
                    "content": "Most of you already know the drill...\n\nperl Makefile.PL\nmake\nmake test\nmake install\n\nFor everyone else out there... if you've never installed Perl code before, or you're trying to\nuse this in an environment where your sysadmin or ISP won't let you do interesting things,\nrelax: since this module contains no binary extensions, you can cheat. That means copying the\ndirectory tree under my \"./lib\" directory into someplace where your script can \"see\" it. For\nexample, under Linux:\n\ncp -r IO-stringy-1.234/lib/* /path/to/my/perl/\n\nNow, in your Perl code, do this:\n\nuse lib \"/path/to/my/perl\";\nuse IO::Scalar;                   ### or whatever\n\nOk, now you've been told. At this point, anyone who whines about not being given enough\ninformation gets an unflattering haiku written about them in the next change log. I'll do it.\nDon't think I won't.\n"
                }
            ]
        },
        "VERSION": {
            "content": "$Id: Stringy.pm,v 1.3 2005/02/10 21:24:05 dfs Exp $\n",
            "subsections": []
        },
        "TO DO": {
            "content": "(2000/08/02) Finalize $/ support\nGraham Barr submitted this patch half a *year* ago; Like a moron, I lost his message under a\nton of others, and only now have the experimental implementation done.\n\nWill the sudden sensitivity to $/ hose anyone out there? I'm worried, so you have to enable\nit explicitly in 1.x. It will be on by default in 2.x, though only IO::Scalar has been\nimplemented.\n\n(2001/08/08) Remove IO::WrapTie from new IO:: classes\nIt's not needed. Backwards compatibility could be maintained by having newtie() be\nidentical to new(). Heck, I'll bet that IO::WrapTie should be reimplemented so the returned\nobject is just like an IO::Scalar in its use of globrefs.\n",
            "subsections": []
        },
        "CHANGE LOG": {
            "content": "Version 2.110 (2005/02/10)\nMaintainership taken over by DSKOLL <dfs@roaringpenguin.com>\n\nClosed the following bugs at https://rt.cpan.org/NoAuth/Bugs.html?Dist=IO-stringy:\n\n2208 IO::ScalarArray->getline does not return undef for EOF if undef($/)\n7132 IO-stringy/Makefile.PL bug - name should be module name\n11249 IO::Scalar flush shouldn't return undef\n2172 $\\ (output record separator) not respected\n8605 IO::InnerFile::seek() should return 1 on success\n4798 *.html in lib/\n4369 Improvement: handling of fixed-size reads in IO::Scalar\n(Actually, bug 4369 was closed in Version 2.109)\n\nVersion 2.109 (2003/12/21)\nIO::Scalar::getline now works with ref to int. *Thanks to Dominique Quatravaux for this\npatch.*\n\nVersion 2.108 (2001/08/20)\nThe terms-of-use have been placed in the distribution file \"COPYING\". Also, small\ndocumentation tweaks were made.\n\nVersion 2.105 (2001/08/09)\nAdded support for various seek() whences to IO::ScalarArray.\n\nAdded support for consulting $/ in IO::Scalar and IO::ScalarArray. The old \"useRS()\" is not\neven an option. Unsupported record separators will cause a croak().\n\nAdded a lot of regression tests to supoprt the above.\n\nBetter on-line docs (hyperlinks to individual functions).\n\nVersion 2.103 (2001/08/08)\nAfter sober consideration I have reimplemented IO::Scalar::print() so that it once again\nalways seeks to the end of the string. Benchmarks show the new implementation to be just as\nfast as Juergen's contributed patch; until someone can convince me otherwise, the current,\nsafer implementation stays.\n\nI thought more about giving IO::Scalar two separate handles, one for reading and one for\nwriting, as suggested by Binkley. His points about what tell() and eof() return are, I\nthink, show-stoppers for this feature. Even the manpages for stdio's fseek() seem to imply a\n*single* file position indicator, not two. So I think I will take this off the TO DO list.\nRemedy: you can always have two handles open on the same scalar, one which you only write\nto, and one which you only read from. That should give the same effect.\n\nVersion 2.101 (2001/08/07)\nAlpha release. This is the initial release of the \"IO::Scalar and friends are now subclasses\nof IO::Handle\". I'm flinging it against the wall. Please tell me if the banana sticks. When\nit does, the banana will be called 2.2x.\n\nFirst off, *many many thanks to Doug Wilson*, who has provided an *invaluable* service by\npatching IO::Scalar and friends so that they (1) inherit from IO::Handle, (2) automatically\ntie themselves so that the \"new()\" objects can be used in native i/o constructs, and (3)\ndoing it so that the whole damn thing passes its regression tests. As Doug knows, my globref\nKung-Fu was not up to the task; he graciously provided the patches. This has earned him a\nseat at the Co-Authors table, and the right to have me address him as *sensei*.\n\nPerformance of IO::Scalar::print() has been improved by as much as 2x for lots of little\nprints, with the cost of forcing those who print-then-seek-then-print to explicitly seek to\nend-of-string before printing again. *Thanks to Juergen Zeller for this patch.*\n\nAdded the COPYING file, which had been missing from prior versions. *Thanks to Albert\nChin-A-Young for pointing this out.*\n\nIO::Scalar consults $/ by default (1.x ignored it by default). Yes, I still need to support\nIO::ScalarArray.\n\nVersion 1.221 (2001/08/07)\nI threatened in \"INSTALLATION\" to write an unflattering haiku about anyone who whined that I\ngave them insufficient information... but it turns out that I left out a crucial direction.\nD'OH! *Thanks to David Beroff for the \"patch\" and the haiku...*\n\nEnough info there?\nHere's unflattering haiku:\nForgot the line, \"make\"!  ;-)\n\nVersion 1.220 (2001/04/03)\nAdded untested SEEK, TELL, and EOF methods to IO::Scalar and IO::ScalarArray to support\ncorresponding functions for tied filehandles: untested, because I'm still running 5.00556\nand Perl is complaining about \"tell() on unopened file\". *Thanks to Graham Barr for the\nsuggestion.*\n\nRemoved not-fully-blank lines from modules; these were causing lots of POD-related warnings.\n*Thanks to Nicolas Joly for the suggestion.*\n\nVersion 1.219 (2001/02/23)\nIO::Scalar objects can now be made sensitive to $/ . Pains were taken to keep the fast code\nfast while adding this feature. *Cheers to Graham Barr for submitting his patch; jeers to me\nfor losing his email for 6 months.*\n\nVersion 1.218 (2001/02/23)\nIO::Scalar has a new sysseek() method. *Thanks again to Richard Jones.*\n\nNew \"TO DO\" section, because people who submit patches/ideas should at least know that\nthey're in the system... and that I won't lose their stuff. Please read it.\n\nNew entries in \"AUTHOR\". Please read those too.\n\nVersion 1.216 (2000/09/28)\nIO::Scalar and IO::ScalarArray now inherit from IO::Handle. I thought I'd remembered a\nproblem with this ages ago, related to the fact that these IO:: modules don't have \"real\"\nfilehandles, but the problem apparently isn't surfacing now. If you suddenly encounter Perl\nwarnings during global destruction (especially if you're using tied filehandles), then\nplease let me know! *Thanks to B. K. Oxley (binkley) for this.*\n\nNasty bug fixed in IO::Scalar::write(). Apparently, the offset and the number-of-bytes\narguments were, for all practical purposes, *reversed.* You were okay if you did all your\nwriting with print(), but boy was *this* a stupid bug! *Thanks to Richard Jones for finding\nthis one. For you, Rich, a double-length haiku:*\n\nNewspaper headline\ntypeset by dyslexic man\nloses urgency\n\nBABY EATS FISH is\nsimply not equivalent\nto FISH EATS BABY\n\nNew sysread and syswrite methods for IO::Scalar. *Thanks again to Richard Jones for this.*\n\nVersion 1.215 (2000/09/05)\nAdded 'bool' overload to '\"\"' overload, so object always evaluates to true. (Whew. Glad I\ncaught this before it went to CPAN.)\n\nVersion 1.214 (2000/09/03)\nEvaluating an IO::Scalar in a string context now yields the underlying string. *Thanks to B.\nK. Oxley (binkley) for this.*\n\nVersion 1.213 (2000/08/16)\nMinor documentation fixes.\n\nVersion 1.212 (2000/06/02)\nFixed IO::InnerFile incompatibility with Perl5.004. *Thanks to many folks for reporting\nthis.*\n\nVersion 1.210 (2000/04/17)\nAdded flush() and other no-op methods. *Thanks to Doru Petrescu for suggesting this.*\n\nVersion 1.209 (2000/03/17)\nSmall bug fixes.\n\nVersion 1.208 (2000/03/14)\nIncorporated a number of contributed patches and extensions, mostly related to speed hacks,\nsupport for \"offset\", and WRITE/CLOSE methods. *Thanks to Richard Jones, Doru Petrescu, and\nmany others.*\n\nVersion 1.206 (1999/04/18)\nAdded creation of ./testout when Makefile.PL is run.\n\nVersion 1.205 (1999/01/15)\nVerified for Perl5.005.\n\nVersion 1.202 (1998/04/18)\nNew IO::WrapTie and IO::AtomicFile added.\n\nVersion 1.110\nAdded IO::WrapTie.\n\nVersion 1.107\nAdded IO::Lines, and made some bug fixes to IO::ScalarArray. Also, added getc().\n\nVersion 1.105\nNo real changes; just upgraded IO::Wrap to have a $VERSION string.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Primary Maintainer\nDianne Skoll (dfs@roaringpenguin.com).\n\nOriginal Author\nEryq (eryq@zeegee.com). President, ZeeGee Software Inc (http://www.zeegee.com).\n\nCo-Authors\nFor all their bug reports and patch submissions, the following are officially recognized:\n\nRichard Jones\nB. K. Oxley (binkley)\nDoru Petrescu\nDoug Wilson (for picking up the ball I dropped, and doing tie() right)\n\nGo to http://www.zeegee.com for the latest downloads and on-line documentation for this module.\n\nEnjoy. Yell if it breaks.\n",
            "subsections": []
        }
    },
    "summary": "IO-stringy - I/O on in-core objects like strings and arrays",
    "flags": [],
    "examples": [],
    "see_also": []
}