X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FIO_Compress_Zlib%2Fexamples%2Funzip;h=0623253db04dfab1988c8ce764c32a613a33c76b;hb=93d092e27236bf0069d60659d00503bf5d187b7b;hp=417a9d28a8dd406efe57dab69da1f764b5a75a22;hpb=277189c8ad3fc0d1dcd4c757f62b0a7bf5bacaa0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/IO_Compress_Zlib/examples/unzip b/ext/IO_Compress_Zlib/examples/unzip index 417a9d2..0623253 100644 --- a/ext/IO_Compress_Zlib/examples/unzip +++ b/ext/IO_Compress_Zlib/examples/unzip @@ -2,10 +2,13 @@ use strict; use warnings; +use File::Path; +use File::Basename; use IO::File; -use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError); +use IO::Uncompress::RawInflate qw(:all); -die "Usage: zipcat file" + +die "Usage: zipcat file\n" if @ARGV != 1 ; my $file = $ARGV[0] ; @@ -53,9 +56,10 @@ while () warn "Writing file '$filename' $compressedMethod\n"; - mkpath basename $filename; + #mkpath dirname $filename; - rawinflate $fh => $filename, + #rawinflate $fh => $filename, + rawinflate $fh => '-', Transparent => 1, InputLength => $compressedLength or die "Error uncompressing $file [$filename]: $RawInflateError\n" ;