Skip Menu |
 

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

Report information
The Basics
Id: 81414
Status: new
Priority: 0/
Queue: IO-Zlib

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: tied seek/tell error return
Date: Sun, 25 Nov 2012 07:39:12 +1100
To: bug-IO-Zlib [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Download (untitled) / with headers
text/plain 984b
With recent debian i386 perl 5.14.2 and its included IO::Zlib 1.10, running system "echo hi >/tmp/foo.txt"; system "gzip /tmp/foo.txt"; use IO::Zlib; tie *FH, 'IO::Zlib', "/tmp/foo.txt.gz", "rb"; seek FH, 0,0; dies with Not a GLOB reference at /usr/share/perl/5.14/IO/Zlib.pm line 559. where I hoped that seek() would return false with $!, as for other file handles. Perhaps the couple of lines below, pending possible future gzseek/gztell. # No seek() yet. # # With Compress::Zlib could gzseek() to support forward seeks and # gztell() for current position. # # With external gunzip could read and discard to seek forward. Might # have to remember the file position explicitly to support TELL. # # POSIX.1 specifies ESPIPE for attempting to seek a pipe. Maybe could # return that if available, instead of EINVAL. # sub SEEK { require POSIX; $! = POSIX::EINVAL(); return 0; } sub TELL { require POSIX; $! = POSIX::EINVAL(); return -1; }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.