This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[REPATCH] Re: [PATCH lib/ExtUtils/Manifest.pm] Minor bug in comment logic in maniread...
authorMichael G. Schwern <schwern@pobox.com>
Mon, 24 Sep 2001 11:12:13 +0000 (07:12 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 24 Sep 2001 14:12:06 +0000 (14:12 +0000)
Message-ID: <20010924111213.G27885@blackrider>

p4raw-id: //depot/perl@12178

lib/ExtUtils/Manifest.pm

index 4656ead..2d4d7e3 100644 (file)
@@ -142,15 +142,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 +158,10 @@ 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 = "\L$okfile";
        }
-       else { /^(\S+)\s*(.*)/ and $read->{$1}=$2; }
+
+        $read->{$file} = $comment;
     }
     close M;
     $read;