Fix maintainers.t on Win32 with Borland compiler
authorSteve Hay <SteveHay@planit.com>
Mon, 28 Sep 2009 14:05:24 +0000 (15:05 +0100)
committerSteve Hay <SteveHay@planit.com>
Mon, 28 Sep 2009 14:05:24 +0000 (15:05 +0100)
Borland's C run-time thinks that glob patterns with * and ? characters are
files or directories. There are no files or directories in the perl source
containing those characters, so give it a helping hand when using -f or -d.

Porting/Maintainers.pm

index 8de91c4..187e38b 100644 (file)
@@ -69,9 +69,9 @@ sub get_module_pat {
 sub expand_glob {
     sort { lc $a cmp lc $b }
        map {
-           -f $_ ? # File as-is.
+           -f $_ && $_ !~ /[*?]/ ? # File as-is.
                $_ :
-               -d _ ? # Recurse into directories.
+               -d _ && $_ !~ /[*?]/ ? # Recurse into directories.
                do {
                    my @files;
                    find(