develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [perl #74790] SelfLoader mixing sysseek() and tell()

Thread Previous | Thread Next
From:
Eric Brine
Date:
May 1, 2010 13:05
Subject:
Re: [perl #74790] SelfLoader mixing sysseek() and tell()
Message ID:
g2if86994701005011305t6c353909mbd6119ac6fe70b31@mail.gmail.com
On Thu, Apr 29, 2010 at 7:10 PM, Kevin Ryde <perlbug-followup@perl.org>wrote:

> # New Ticket Created by  Kevin Ryde
> # Please include the string:  [perl #74790]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74790 >
>


> While nosing around SelfLoader 1.17 I noticed it combines sysseek() with
> tell(). I wonder if that may be unfriendly to input stream layers which
> are doing a data transformation so that tell() doesn't correspond to the
> underlying file position.  Should it be plain seek() with tell()?
>

I'm not sure what the purpose of the sysseek is there, but since it's
followed by file handle duping, I suspect that dealing with the system file
handle (sysseek) instead of the Perl file handle (seek) is required. If so,
the solution would be to use change tell($fh) to sysseek($fh,0,1), not
changing sysseek to seek.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About