Fixup Embed.t for Win32/VC++
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / Manifest.pm
index 4656ead..e75b077 100644 (file)
@@ -69,6 +69,7 @@ sub manifind {
              $name =~ s/^:([^:]+)$/$1/ if $Is_MacOS;
              warn "Debug: diskfile $name\n" if $Debug;
              $name =~ s#(.*)\.$#\L$1# if $Is_VMS;
+             $name = uc($name) if /^MANIFEST/i && $Is_VMS;
              $found->{$name} = "";}, $Is_MacOS ? ":" : ".");
     $found;
 }
@@ -142,15 +143,15 @@ sub maniread {
     while (<M>){
        chomp;
        next if /^#/;
+
+        my($file, $comment) = /^(\S+)\s*(.*)/;
+        next unless $file;
+
        if ($Is_MacOS) {
-           my($item,$text) = /^(\S+)\s*(.*)/;
-           $item = _macify($item);
-           $item =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
-           $read->{$item}=$text;
+           $file = _macify($file);
+           $file =~ s/\\([0-3][0-7][0-7])/sprintf("%c", oct($1))/ge;
        }
        elsif ($Is_VMS) {
-           my($file)= /^(\S+)/;
-           next unless $file;
            my($base,$dir) = File::Basename::fileparse($file);
            # Resolve illegal file specifications in the same way as tar
            $dir =~ tr/./_/;
@@ -158,9 +159,11 @@ sub maniread {
            if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); }
            my $okfile = "$dir$base";
            warn "Debug: Illegal name $file changed to $okfile\n" if $Debug;
-           $read->{"\L$okfile"}=$_;
+            $file = $okfile;
+            $file = lc($file) unless $file =~ /^MANIFEST/i;
        }
-       else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; }
+
+        $read->{$file} = $comment;
     }
     close M;
     $read;