In Extract.pm, upper case options to commands must be enclosed in double quotes. This seems to only affect the UNZIP command.

In 01_Archive-Extract.t, to compare directory components in VMS syntax, the trailing "]" needs to be removed.

-John
[EMAIL PROTECTED]
Personal Opinion Only
--- /rsync_root/perl/lib/Archive/Extract.pm     Fri Jul  6 03:11:52 2007
+++ lib/Archive/Extract.pm      Sat Aug 18 10:19:18 2007
@@ -17,6 +17,9 @@
 use constant ON_SOLARIS     => $^O eq 'solaris' ? 1 : 0;
 use constant FILE_EXISTS    => sub { -e $_[0] ? 1 : 0 };
 
+### VMS may require quoting upper case command options
+use constant ON_VMS         => $^O eq 'VMS' ? 1 : 0;
+
 ### If these are changed, update @TYPES and the new() POD
 use constant TGZ            => 'tgz';
 use constant TAR            => 'tar';
@@ -851,7 +854,12 @@
 
 
     ### first, get the files.. it must be 2 different commands with 'unzip' :(
-    {   my $cmd = [ $self->bin_unzip, '-Z', '-1', $self->archive ];
+    {   my $cmd;
+       if (ON_VMS) {
+           $cmd = [ $self->bin_unzip, '"-Z"', '-1', $self->archive ];
+       } else {
+           $cmd = [ $self->bin_unzip, '-Z', '-1', $self->archive ];
+       }
 
         my $buffer = '';
         unless( scalar run( command => $cmd,
--- /rsync_root/perl/lib/Archive/Extract/t/01_Archive-Extract.t Mon May 28 
07:33:43 2007
+++ lib/Archive/Extract/t/01_Archive-Extract.t  Thu Aug 16 23:06:18 2007
@@ -362,6 +362,10 @@
                         ### if something went wrong with determining the out
                         ### path, don't go deleting stuff.. might be Really Bad
                         my $out_re = quotemeta( $OutDir );
+
+                       # Remove the directory terminator from regex
+                       my $out_re = s/\\\]// if IS_VMS;
+
                         if( $ae->extract_path !~ /^$out_re/ ) {   
                             ok( 0, "Extractpath WRONG 
(".$ae->extract_path.")"); 
                             skip(  "Unsafe operation -- skip cleanup!!!" ), 1;

Reply via email to