Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Archive-Zip CPAN distribution.

Report information
The Basics
Id:
87932
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
tschoening [...] am-soft.de
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
1.30
Fixed in:
(no value)



Subject: Using Archive::Zip reading from IO::String results in a seek error
I have an application which needs to read zipped data from a scalar. I therefore wrapped the in-memory zipped content into an IO::String, created Archive::Zip using new and parsed the zipped data using Archive::Zip::read. Everything seemed to work, I got the zip members, their sizes etc., but on accessing the contents using the contents()-method of any member the only return was "4", which indicates an error. After some debugging I found that Archive::Zip::Archive::read closes the file handle it worked with, resulting in IO::String discarding it's associated buffer. As IO::String is no file, it really loses any data and Archive::Zip can't just reopen the given handle anymore. If my application calls IO::String::open on the former created object with the former used in memory zip data again, $member->contents() is working as expected. From my point of view this is a bug as Archive::Zip::Archive::Read should only close file handles it opened itself and/or is sure of that closing and reopening a file handle is possible without data loss. This is not the case with IO::String as on closing it deletes it buffers. http://www.perlmonks.org/?node_id=1049841


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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