Subject: | IO::Zlib decompression skipped if passed filehandle |
Using Archive::Tar in a CGI environment, I have a CGI form that allows uploading a .tgz file. Archive::Tar skips decompression DESPITE being passed a '1' flag to read() to enable it, as I pass in a filehandle -- which is simply a pseudo-filehandle linked to a variable (since I already read the contents from the web client). Either this should be documented, or decompression should happen still. It would appear to be a bad assumption that just because there is a filehandle provided, that it's ALREADY in tar-mode and not compressed tar-mode.
It would be VERY helpful if I could simply pass in a STRING containing the data, as it's more common to use the CGI.pm library rather than manually reading STDIN for multipart (file-uploaded) forms. I have to create a pseudo filehandle using open(), which is one extra step.