Skip Menu |

This queue is for tickets about the IO-stringy CPAN distribution.

Report information
The Basics
Id: 42662
Status: new
Priority: 0/
Queue: IO-stringy

People
Owner: Nobody in particular
Requestors: steve [...] computurn.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.110
Fixed in: (no value)



Subject: IO::Wrap::wraphandle doesn't handle Scalars or Arrays
wraphandle() should receive anything and return a IO::Handle type object if at all possible. However, it does not cope with things which are handled by IO::Scalar or IO::Lines. Hence I need to wrap calls to wraphandle() in the following code: unless (ref $ref) { return wraphandle($ref) if ref =~ /^STD(ERR|IN|OUT)$/; return new IO::Scalar \$ref; } return new IO::Scalar $ref if (ref $ref eq 'SCALAR'); return new IO::Lines $ref if (ref $ref eq 'ARRAY'); # Hope that IO::Wrap::wraphandle can handle it. return wraphandle($ref); Could this be incorporated into wraphandle() itself?