local $_;
while (<M>){
chomp;
- next if /^#/;
+ next if /^\s*#/;
my($file, $comment) = /^(\S+)\s*(.*)/;
next unless $file;
maniadd({ $file => $comment, ...});
-Adds an entry to an existing F<MANIFEST>.
+Adds an entry to an existing F<MANIFEST> unless its already there.
$file will be normalized (ie. Unixified). B<UNIMPLEMENTED>
my $manifest = maniread();
open(MANIFEST, ">>$MANIFEST") or die "Could not open $MANIFEST: $!";
foreach my $file (_sort keys %$additions) {
+ next if exists $manifest->{$file};
+
my $comment = $additions->{$file} || '';
- printf MANIFEST "%-40s%s\n", $file, $comment unless
- exists $manifest->{$file};
+ printf MANIFEST "%-40s%s\n", $file, $comment;
}
close MANIFEST;
}