in reply to Tie::File strangeness with unshift

Is it possible that when you installed Tie::File v0.93, you did it somewhere other than your .../perl/lib directory? .../perl/site/lib maybe?

I ask, because looking at line 699 of v0.93 show it to be a comment line. The error makes sense in the context of line 699 of v0.95 though.

I also get an error on line 699 when I tried v0.95 in conjunction with perl 5.6.1. Although it was a different error. I got:

Parentheses missing around "my" list at e:/Perl/lib/Tie/File.pm line 6 +73. Parentheses missing around "my" list at e:/Perl/lib/Tie/File.pm line 6 +99.

You can check which version is being found like this:

C:\test>perl -mTie::File -e "print $Tie::File::VERSION" 0.95

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

Replies are listed 'Best First'.
Re: Re: Tie::File strangeness with unshift
by u914 (Pilgrim) on May 26, 2003 at 01:08 UTC
    line 699 in v0.95 (which i'm using, see above) is:
    read $fh, $old, $readsizei;
    And... it turns out that when i was "uninstalling" 0.95 as mentioned above, it wasn't being uninstalled... i found the offending file (to look at it above) and renamed it.

    The test script now magically works ( locate File.pm reports another copy of File.pm, that one is v0.93)

      914,
      I couldn't let this drop - glad that you found the problem. I am intrigued though. Are you sure line 699 is exactly as you have written it above? I just downloaded it and mine reads:

      read $fh, my $old, $readsize;

      Notice the my infront of old and no i at the end of $readsize. I wonder if someone was hacking what they shouldn't have been. In anycase, if you are confident the problem is with v.095 let Dominus know, but be sure to include a test case he can reproduce.

      Cheers - L~R

        L~R,

        You seem to have a point... i have no idea how this happened, but apparently the File.pm in my libs was/got corrupted.

        I'm not the only one on the server, but the list is extra-short, so i know where to look... ;-)

        I've deleted and restored, and now v0.95 works peachy, both with the test case and my original CGI script (which was unchanged).

        Anyhow, thanks again for your help/attention! It makes me glad to know that there wasn't/isn't a 'real' issue with Tie::File.