+ return unless $new;
+
+ my ($fh, $tmp) = tempfile('alt-XXXXXXXX', DIR => $info_dir);
+ print $fh join("\n", sort { $alt{$b} <=> $alt{$a} } keys %alt), "\n"
+ or die "print $tmp: $!\n";
+ chmod($mode, $fh) or die "fchmod $tmp: $!\n";
+ close $fh or die "close $tmp $!\n";
+ rename($tmp, $alt) or die "rename $tmp => $alt: $!\n";