This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix porting check for dots in directory names.
authorCraig A. Berry <craigberry@mac.com>
Sun, 7 Aug 2011 16:05:40 +0000 (11:05 -0500)
committerCraig A. Berry <craigberry@mac.com>
Mon, 8 Aug 2011 13:57:06 +0000 (08:57 -0500)
The existing check conflated two different potential problems,
multiple dots in a filename and dots in a directory name.

Multiple dots in a filename can cause various kinds of trouble,
depending on the VMS filesystem in use, but there are workarounds
for older filesystems and this problem is unlikely to cause a
build failure, so it's probably too stringent to make a test
fail when we find them (and there are lots of examples already
in the repository).

*Any* dots in a directory name are problematic because dot is the
directory delimiter.  Newer (ODS-5) filesystems can handle these
if escaping is done but older (ODS-2) filesystems can't and the
manifest checker in configure.com can't.  In other words, the
build falls down hard in this case.

The existing test was checking for multiple dots in a directory
name but not checking the filename at all.  I've changed it to
check for any dots in a directory name.

t/porting/filenames.t

index 93f9dce..268dd1c 100644 (file)
@@ -61,8 +61,8 @@ sub validate_file_name {
     my @path_components = split('/',$path);
     pop @path_components; # throw away the filename
     for my $component (@path_components) {
-       if ($component =~ /\..*?\./) {
-           fail("no directory components containing more than one '.'");
+       if ($component =~ /\./) {
+           fail("no directory components containing '.'");
            return;
        }
        if (length $component > 32) {