IO-stringy reviews

cpanratings
 

RSS | Module Info | Add a review of IO-stringy

IO-stringy (2.110) *****

I'm just reviewing IO::ScalarArray, one of several modules in the IO-stringy package. This module emulates a filehandle, but reads from or writes to an in-memory array. Like most of the IO:: modules, the interface is trivial because it behaves quite like a glob filehandle. The only unique method you need to know is aref().

When writing a large amount of data a bit at a time, it's more efficient to append to a list and join() at the end than to repeatedly append to a string. So, I'm using IO::ScalarArray instead of IO::String or IO::Scalar for my current task of writing a potentially large file in memory. In this case, I'm handing my IO::ScalarArray instance to Text::CSV_XS and it works great.