develooper Front page | perl.perl5.porters | Postings from October 2007

patch for lib/Archive/Extract.pm for EBCDIC platform

Thread Next
From:
Chun Bing Ge
Date:
October 24, 2007 22:38
Subject:
patch for lib/Archive/Extract.pm for EBCDIC platform
Message ID:
OFEF98775E.42BF9138-ON4825737F.001E8740-4825737F.001EE646@IBMCN
Hi,

Here is the patch below. Any question, pls let me know, thanks.


--- /home/spring/perl/perl-current/lib/Archive/Extract.pm       2007-04-12 
22:35:04.000000000 +0800
+++ /home/spring/patch/chgfile/lib-Archive-Extract.pm   2007-10-08 
15:32:09.000000000 +0800
@@ -527,12 +527,23 @@
     }
 
     ### now actually extract it ###
-    {   my $cmd = 
+    {   my $cmd;
+         if (ord("A") == 193) {
+               $cmd =
+            $self->is_tgz ? [$self->bin_gzip, '-cdf', $self->archive, 
'|',
+                             $self->bin_tar, '-xof', '-'] :
+            $self->is_tbz ? [$self->bin_bunzip2, '-c', $self->archive, 
'|', 
+                             $self->bin_tar, '-xof', '-'] :
+            [$self->bin_tar, '-xof', $self->archive];
+         }
+         else {
+               $cmd =
             $self->is_tgz ? [$self->bin_gzip, '-cdf', $self->archive, 
'|',
                              $self->bin_tar, '-xf', '-'] :
             $self->is_tbz ? [$self->bin_bunzip2, '-c', $self->archive, 
'|', 
                              $self->bin_tar, '-xf', '-'] :
             [$self->bin_tar, '-xf', $self->archive];
+         }
 
         my $buffer = '';
         unless( scalar run( command => $cmd,



Ge, Chun Bing
空山新雨后,天气晚来秋

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About