Skip Menu |

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

Report information
The Basics
Id: 82518
Status: resolved
Priority: 0/
Queue: IO-stringy

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: DOHERTY [...] cpan.org
Cc:
AdminCc:

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



Subject: IO::String doesn't implement BINMODE etc
perldoc perltie says: A class implementing a tied filehandle should define the following methods: TIEHANDLE, at least one of PRINT, PRINTF, WRITE, READLINE, GETC, READ, and possibly CLOSE, UNTIE and DESTROY. The class can also provide: BINMODE, OPEN, EOF, FILENO, SEEK, TELL - if the corresponding perl operators are used on the handle. But IO::String doesn't implement BINMODE, and maybe others, so you can't use the binmode operator on an IO::String object without it blowing up with the error "Can't locate object method "BINMODE" via package "IO::Scalar""
Subject: Re: [rt.cpan.org #82518] IO::String doesn't implement BINMODE etc
Date: Sun, 6 Jan 2013 10:38:20 -0500
To: bug-IO-stringy [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
On Sun, 6 Jan 2013 10:03:19 -0500 "Mike Doherty via RT" <bug-IO-stringy@rt.cpan.org> wrote: Show quoted text
> The class can also provide: BINMODE, OPEN, EOF, FILENO, SEEK, TELL - > if the corresponding perl operators are used on the handle.
I see a "sub binmode {}" in my version of IO::Scalar so you could use $x->binmode() rather than binmode $x, I suppose. Show quoted text
> But IO::String doesn't implement BINMODE, and maybe others, so you > can't use the binmode operator on an IO::String object without it > blowing up with the error "Can't locate object method "BINMODE" via > package "IO::Scalar""
I'll look at fixing it. Meanwhile, the fix is trivial: package IO::Scalar; sub BINMODE {} Regards, David.
Hi, I've added: sub BINMODE { 1; } to IO::Scalar and IO::ScalarArray; the fix will be in the next release. Regards, David.
Thanks everyone. This is out in the wild. Thanks, Chase