in reply to TIEHANDLE problem

I'm one of the monks who went over this with sgifford in the Chatterbox (davido is the other), I'm completing sgiffords question with some of the findings in the chatterbox. We've established the following:
  1. Code works as is, in perl 5.8.7
  2. Code works with perl 5.6.1 provided you replace the $f1 with an actual globale handle, like F1:
    tie *F1, 'TieTest'; print "Read: ",scalar(<F1>);
  3. Replacing the gensym with an instance of IO::Handle doesn't make a difference (that's why the line use IO::Handle is in this code).
  4. Opening $f1 first to a different handle in order to make the handle exist in the glob, doesn't help.

We're all very curious to what is going on, and if there's a way around it apart from upgrading Perl. I personally suspect that there's a problem with autovivification of the filehandle with the tie, but it's just a suspicion.

Any insight from somebody who really knows what is going on, and preferably, a way to make it work on perl 5.6.1, would be appreciated.

Update I've now had a chance to test it on Indigoperl (Activeperl compatible) 5.6.1 on Win32: I can confirm it has the same problem there. It looks like an actual bug in 5.6.x to me.

Replies are listed 'Best First'.
Re^2: TIEHANDLE problem
by davido (Cardinal) on Apr 04, 2006 at 06:55 UTC

    It probably is a 5.6.x bug, but what is conspicuously abscent is any "easy to find" mention of its being fixed in any of the perldelta POD's. ...at least given a quick eyeball skimming of each delta POD from early 5.6.x through present, followed by grepping for a variety of search terms. Can anyone uncover any documentation on the subject?


    Dave