Skip Menu |

This queue is for tickets about the Tie-Filehandle-Preempt-Stdin CPAN distribution.

Report information
The Basics
Id: 29066
Status: rejected
Worked: 45 min
Priority: 0/
Queue: Tie-Filehandle-Preempt-Stdin

People
Owner: jkeenan [...] cpan.org
Requestors: doughera [...] lafayette.edu
Cc:
AdminCc:

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



Subject: Re: [perl #45025] Failures in t/configure/107-inter_progs.0[12].t (fwd)
Date: Thu, 30 Aug 2007 08:56:08 -0400 (EDT)
To: bug-Tie-Filehandle-Preempt-Stdin [...] rt.cpan.org.
From: Andrew Dougherty <doughera [...] lafayette.edu>
Date: Wed, 29 Aug 2007 15:47:25 -0700 From: James Keenan via RT <parrotbug-followup@parrotcode.org> To: doughera@lafayette.edu Subject: Re: [perl #45025] Failures in t/configure/107-inter_progs.0[12].t Resent-Date: Wed, 29 Aug 2007 18:47:27 -0400 Resent-From: <doughera@lafayette.edu> Andy Dougherty wrote: Show quoted text
> > This problem is not really Solaris-specific at all. It's simply that > the emulation is missing a bunch of methods. From perldoc -f tie: > > A class implementing a file handle should have the following methods: > > TIEHANDLE classname, LIST > READ this, scalar, length, offset > READLINE this > GETC this > WRITE this, scalar, length, offset > PRINT this, LIST > PRINTF this, format, LIST > BINMODE this > EOF this > FILENO this > SEEK this, position, whence > TELL this > OPEN this, mode, LIST > CLOSE this > DESTROY this > UNTIE this > > > As I said, I think this shows up here due to the use of callbacks in the > hints file.
I wonder if I could ask you to file a bug report at http://rt.cpan.org/Public/Dist/Display.html?Name=Tie-Filehandle-Preempt-Stdin The shame and humiliation of having a bug report filed against one of my CPAN modules would be an excellent impetus to correction of this problem. kid51
From: JKEENAN [...] cpan.org
Andy, Thanks for filing the bug report. Ironically, it turns out that my request for public shaming and humiliation was misdirected. Upon re-reading your postings to the Parrot list, I realize that I misread your original posting in yet another way. The package which was reported as defective for lacking an OPEN method was *not* Tie::Filehandle::Preempt::Stdin. It was, of course, Parrot::IO::Capture::Mini. Why did I make this mistake? Two reasons. (1) I was focused on this package because it was part of the patch I committed to Parrot trunk over the weekend. Parrot::IO::Capture::Mini has been for several months -- but your report was the first to indicate problems with it. (2) It just so happens that TFPS suffers from some of the same limitations as PIOCM. So I'll be focusing my debugging activities on PIOCM rather than this package. On Thu Aug 30 10:33:00 2007, doughera@lafayette.edu wrote: Show quoted text
>
> > > > This problem is not really Solaris-specific at all. It's simply
> that
> > the emulation is missing a bunch of methods. From perldoc -f tie: > > > > A class implementing a file handle should have the following
> methods:
> > > > TIEHANDLE classname, LIST > > READ this, scalar, length, offset > > READLINE this > > GETC this > > WRITE this, scalar, length, offset > > PRINT this, LIST > > PRINTF this, format, LIST > > BINMODE this > > EOF this > > FILENO this > > SEEK this, position, whence > > TELL this > > OPEN this, mode, LIST > > CLOSE this > > DESTROY this > > UNTIE this > > > >
Note the word 'should' in the above. In this case the perldoc sets a different tone from the discussion of this same issue in the Camel book (3rd ed., p 384): "A class implementing a tied filehandle should define the following methods: TIEHANDLE and at least one of PRINT, PRINTF, WRITE, READLINE, GETC, and READ." TFPS implements (http://search.cpan.org/src/JKEENAN/Tie-Filehandle-Preempt-Stdin-0.01/ lib/Tie/Filehandle/Preempt/Stdin.pm) TIEHANDLE and READLINE methods. So it appears that it meets the minimum criteria for a module tying a filehandle -- barely. I'm keeping the bug ticket open to prompt me to consider implementing some of the other methods, particularly CLOSE and DESTROY. Jim Keenan
On Thu Aug 30 19:39:50 2007, JKEENAN wrote: Show quoted text
> Andy, > > Thanks for filing the bug report. Ironically, it turns out that my > request for public shaming > and humiliation was misdirected. Upon re-reading your postings to the > Parrot list, I realize > that I misread your original posting in yet another way. The package > which was reported as > defective for lacking an OPEN method was *not* > Tie::Filehandle::Preempt::Stdin. It was, of > course, Parrot::IO::Capture::Mini. > > Why did I make this mistake? Two reasons. (1) I was focused on this > package because it was > part of the patch I committed to Parrot trunk over the weekend. > Parrot::IO::Capture::Mini has > been for several months -- but your report was the first to indicate > problems with it. (2) It > just so happens that TFPS suffers from some of the same limitations as > PIOCM. So I'll be > focusing my debugging activities on PIOCM rather than this package. > > On Thu Aug 30 10:33:00 2007, doughera@lafayette.edu wrote:
> >
> > > > > > This problem is not really Solaris-specific at all. It's simply
> > that
> > > the emulation is missing a bunch of methods. From perldoc -f tie: > > > > > > A class implementing a file handle should have the following
> > methods:
> > > > > > TIEHANDLE classname, LIST > > > READ this, scalar, length, offset > > > READLINE this > > > GETC this > > > WRITE this, scalar, length, offset > > > PRINT this, LIST > > > PRINTF this, format, LIST > > > BINMODE this > > > EOF this > > > FILENO this > > > SEEK this, position, whence > > > TELL this > > > OPEN this, mode, LIST > > > CLOSE this > > > DESTROY this > > > UNTIE this > > > > > >
> > Note the word 'should' in the above. In this case the perldoc sets a > different tone from the > discussion of this same issue in the Camel book (3rd ed., p 384): > > "A class implementing a tied filehandle should define the following > methods: TIEHANDLE > and at least one of PRINT, PRINTF, WRITE, READLINE, GETC, and READ." > > TFPS implements (http://search.cpan.org/src/JKEENAN/Tie-Filehandle- > Preempt-Stdin-0.01/ > lib/Tie/Filehandle/Preempt/Stdin.pm) TIEHANDLE and READLINE methods. > So it appears that > it meets the minimum criteria for a module tying a filehandle -- > barely. > > I'm keeping the bug ticket open to prompt me to consider implementing > some of the other > methods, particularly CLOSE and DESTROY. > >
Twelve years later ... I haven't encountered another situation where additional methods would be needed, and no one else has complained about this. So I think we can put this ticket to sleep. Thank you very much. Jim Keenan