IO::Scalar vs IO::Stringby joe++ (Friar)
|on Sep 13, 2002 at 13:19 UTC||Need Help??|
joe++ has asked for the wisdom of the Perl Monks concerning the following question:
I'm in the process of connecting the ouput of one external module to the input of another external module. The problem ist that the caller gives me a scalar ref, while I can call the imported method only with a file handle for output.
My solution is to pass the incoming scalar reference to one of IO::File or IO::Scalar, and then passing the resulting file handle along to the next function.
Now my question is: which IO::* module should I pick, considering that I want to ditribute my code to the general Perl users audience?
The docs of IO::Scalar mention IO::String as being its potential successor, but there is only one release of this module on CPAN, which also predates IO::Scalar's latest release...
Example code (snippet):
Any help and opinions are welcome!