Skip Menu |

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

Report information
The Basics
Id: 16909
Status: resolved
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: tomas_maly [...] yahoo.com
Cc:
AdminCc:

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



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.
On Wed Jan 04 12:31:31 2006, guest wrote: Show quoted text
> Either this should be documented, or decompression should happen > still.
Patch 12367 adds explicit documentation for this scenario to Archive::Tar and marks it as a TODO feature: ==== //member/kane/archive-tar-new/lib/Archive/Tar.pm#92 - /Users/kane/sources/p4/ other/archive-tar-new/lib/Archive/Tar.pm ==== 136a137,142 Show quoted text
> Note that you can currently B<not> pass a C<gzip> compressed > filehandle, which is not opened with C<IO::Zlib>, nor a string > containing the full archive information (either compressed or > uncompressed). These are worth while features, but not currently > implemented. See the C<TODO> section. >
1549a1556,1567 Show quoted text
> =item Allow archives to be passed in as string > > Currently, we only allow opened filehandles or filenames, but > not strings. The internals would need some reworking to facilitate > stringified archives. > > =item Facilitate processing an opened filehandle of a compressed archive > > Currently, we only support this if the filehandle is an IO::Zlib object. > Environments, like apache, will present you with an opened filehandle > to an uploaded file, which might be a compressed archive. >