compression modules update to version 2.005
[p5sagit/p5-mst-13.2.git] / ext / IO_Compress_Zlib / examples / unzip
index 417a9d2..0623253 100644 (file)
@@ -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"  ;