- my $o = "$self->{cur_dst}/objects";
- my $f = "$o/info/alternates";
- my $l = File::Spec->abs2rel($alt, File::Spec->rel2abs($o));
- open my $fh, '+>>', $f or die "open($f): $!";
- seek($fh, SEEK_SET, 0) or die "seek($f): $!";
- chomp(my @cur = <$fh>);
- if (!grep(/\A\Q$l\E\z/, @cur)) {
- say $fh $l or die "say($f): $!";
- }
- close $fh or die "close($f): $!";
- $f = "$self->{cur_dst}/config";
- open $fh, '+>>', $f or die "open:($f): $!";
+ my $f = "$self->{cur_dst}/config";
+ open my $fh, '+>>', $f or die "open:($f): $!";