5 Test the well-formed-ness of filenames names in the MANIFEST file. Current
10 =item * no more than 39 characters before the dot, and 39 after
12 =item * no filenames starting with -
14 =item * don't use any of these names (regardless of case) before the dot: CON,
15 PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1,
16 LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
18 =item * no spaces, ( or & in filenames
34 my $manifest = '../MANIFEST';
36 open my $m, '<', $manifest or die "Can't open '$manifest': $!";
40 my($path) = split /\t+/;
48 PATHNAME: for my $pathname (@files) {
49 my @path_components = split('/',$pathname);
50 my $filename = pop @path_components;
51 for my $component (@path_components) {
52 if ($component =~ /\./) {
53 fail("$pathname has directory components containing '.'");
56 if (length $component > 32) {
57 fail("$pathname has a name over 32 characters (VOS requirement)");
63 if ($filename =~ /^\-/) {
64 fail("$pathname starts with -");
68 my($before, $after) = split /\./, $filename;
69 if (length $before > 39) {
70 fail("$pathname has more than 39 characters before the dot");
71 } elsif ($after && length $after > 39) {
72 fail("$pathname has more than 39 characters after the dot");
73 } elsif ($filename =~ /^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])\./i) {
74 fail("$pathname has a reserved name");
75 } elsif ($filename =~ /\s|\(|\&/) {
76 fail("$pathname has a reserved character");