In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4767d89388527b747495568a327247ba5b9c72bf?hp=30d6839e766e18ae18b768d016d3376c92bb3a9b>

- Log -----------------------------------------------------------------
commit 4767d89388527b747495568a327247ba5b9c72bf
Author: Craig A. Berry <[email protected]>
Date:   Sat Jan 14 15:44:15 2017 -0600

    Use File::Spec->catfile() in Test2's Files.t test.
    
    Explicitly using forward slashes to concatenate filenames is not
    portable and we've already loaded File::Spec anyway.  Also, don't
    try to remove the directory we're cleaning up unless we were
    successful in opening it.

M       Porting/Maintainers.pl
M       cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t
M       t/porting/customized.dat

commit 1d86dd2f9a6c95dbe3230acac995ec2205513b0d
Author: Craig A. Berry <[email protected]>
Date:   Sat Jan 14 14:44:15 2017 -0600

    Don't escape tilde when converting to VMS filespecs.
    
    There is only one use case for requiring a tilde to be escaped,
    and that is when it is the first character in a file or directory
    component and is *not* an indication of a special shell expansion
    such as the user's home directory.  This scenario simply can't
    come up when translating a Unix-format path to VMS format, so
    there is nothing to be gained by escaping.
    
    Escaping things we don't need to runs afoul of other goofy things
    people do with filenames.  Test2 encodes data in tilde-delimited
    temporary filenames and uses a naive join and split to manipulate
    the components.  Adding a caret escape to each component is a
    data corruption in this scheme, and this patch fixes test failures
    in Test2 without any changes to that module.

M       vms/vms.c
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl                              | 4 ++++
 cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t | 8 +++++---
 t/porting/customized.dat                            | 1 +
 vms/vms.c                                           | 7 ++-----
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 2b72707d4a..b6fed8b15a 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1178,6 +1178,10 @@ use File::Glob qw(:case);
                 t/zzz-check-breaks.t
                 ),
         ],
+        'CUSTOMIZED'   => [
+            #
+            qw( t/Test2/modules/IPC/Driver/Files.t )
+        ],
     },
 
     'Text::Abbrev' => {
diff --git a/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t 
b/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t
index 0e79101d51..367d0ef6a0 100644
--- a/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t
+++ b/cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t
@@ -160,11 +160,13 @@ ok(!-d $tmpdir, "cleaned up temp dir");
         if (opendir(my $d, $tmpdir)) {
             for my $f (readdir($d)) {
                 next if $f =~ m/^\.+$/;
-                next unless -f "$tmpdir/$f";
-                unlink("$tmpdir/$f");
+                my $file = File::Spec->catfile($tmpdir, $f);
+                next unless -f $file;
+                1 while unlink $file;
             }
+            closedir($d);
+            rmdir($tmpdir) or warn "Could not remove temp dir '$tmpdir': $!";
         }
-        rmdir($tmpdir) or warn "Could not remove temp dir '$tmpdir': $!";
     };
     $cleanup->();
 
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index a2a953a36a..24df433f99 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -107,6 +107,7 @@ Test::Harness 
cpan/Test-Harness/lib/TAP/Parser/SourceHandler/RawTAP.pm d01e1e2a8
 Test::Harness cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm 
76771092dd2b87a2adb7ff20b7ae77cbae7d0563
 Test::Harness cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm 
bf1fbfff9720330886651f183959a5db56daeea0
 Test::Harness cpan/Test-Harness/lib/Test/Harness.pm 
da2d76ba673372da129060c9d0adb8cf0d91f9f7
+Test::Simple cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t 
59648b5745fda06177d81c2c21f55b09f6e129bb
 autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac
 base dist/base/lib/base.pm 9575442273694d41c8e86cb1d86fa1935a07c8a8
 version cpan/version/lib/version.pm a032a751524bdd07a93c945d2a1703abe7ad8ef0
diff --git a/vms/vms.c b/vms/vms.c
index d1a89cdc4d..efe7f4554c 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -483,7 +483,6 @@ copy_expand_unix_filename_escape(char *outspec, const char 
*inspec, int *output_
        return 1;
        break;
     case '.':
-    case '~':
     case '!':
     case '#':
     case '&':
@@ -505,7 +504,7 @@ copy_expand_unix_filename_escape(char *outspec, const char 
*inspec, int *output_
         /* Don't escape again if following character is 
          * already something we escape.
          */
-        if (strchr(".~!#&\'`()+@{},;[]%^=_\\", *(inspec+1))) {
+        if (strchr(".!#&\'`()+@{},;[]%^=_\\", *(inspec+1))) {
            *outspec = *inspec;
            *output_cnt = 1;
            return 1;
@@ -8335,7 +8334,6 @@ posix_to_vmsspec_hardway(char *vmspath, int vmspath_len, 
const char *unixpath,
        vmsptr += out_cnt;
        unixptr += in_cnt;
        break;
-    case '~':
     case ';':
     case '\\':
     case '?':
@@ -8789,7 +8787,6 @@ int_tovmsspec(const char *path, char *rslt, int dir_flag, 
int * utf8_flag)
        }
        break;
     case '\"':
-    case '~':
     case '`':
     case '!':
     case '#':
@@ -8798,7 +8795,7 @@ int_tovmsspec(const char *path, char *rslt, int dir_flag, 
int * utf8_flag)
         /* Don't escape again if following character is 
          * already something we escape.
          */
-        if (strchr("\"~`!#%^&()=+\'@[]{}:\\|<>_.", *(cp2+1))) {
+        if (strchr("\"`!#%^&()=+\'@[]{}:\\|<>_.", *(cp2+1))) {
            *(cp1++) = *(cp2++);
            break;
         }

--
Perl5 Master Repository

Reply via email to