in reply to Re: Reading data from ZIP data in a File::Temp filehandle problem
in thread Reading data from ZIP data in a File::Temp filehandle problem

Yes, but I'm not starting with a file, I'm starting with an URL and staging the file temporarily via File::Temp. The pod documentation of File::Temp specifically states:
Filehandles returned by these functions support the seekable methods.
I don't understand why I would necessarily need to know what the file being created on the fly specifically is if I can just pass a filehandle around and make Archive::Zip read data from the filehandle. Clearly I now see that this differs from how Archive::Zip works. And I do see the documentation that states that is does not yet support streams. I was hoping not to have code that needed to be aware of a temporary file given that such a file was already an open filehandle. It looks like readFromFileHandle() is really only a way to save one an extra file open operation given a file was previously opened?
  • Comment on Re^2: Reading data from ZIP data in a File::Temp filehandle problem
  • Download Code

Replies are listed 'Best First'.
Re^3: Reading data from ZIP data in a File::Temp filehandle problem
by Lotus1 (Vicar) on Sep 15, 2011 at 13:21 UTC

    The way to troubleshoot this is to verify all the parts work individually and then put them together. The next thing to verify is that if the temporary file handle contains a valid zip file that readFromFileHandle will read it. I have experience with Archive::Zip not temporary files. If someone could show how to copy a zip file from disk to a temporary file then you could use that for testing.