Open davehodg opened 3 years ago
No, don't think so.
There is a similar module, called Archive::Zip::SimpleZip, that will do what you want (full disclosure - I am the author)
Here is an example that writes a zip file directly to stdout without any temporary files at all
use Archive::Zip::SimpleZip qw($SimpleZipError) ;
my $zipData ;
my $z = new Archive::Zip::SimpleZip '-',
Stream => 1
or die "$SimpleZipError\n" ;
$z->add("file1.txt");
$z->close();
This looks really plausible. How has it moved on since 1.30 (Centos 7)?
writeToFileHandle() could be used on STDOUT, I think, or just use IO::File to create a handle to do what you want, see the example at:
https://metacpan.org/pod/Archive::Zip#writeToFileHandle(-$fileHandle-[,-$seekable]-)
As a user of RHEL 7, I recommend just using CPAN to update the module to 1.68, not waiting for the yum/dnf package to update.
Is this possible? Worse still we're currently on Centos 7 (v1.30) but upgrading shouldn't be hard.