+
+ my $target = $self->target;
+
+ require File::Spec;
+ my ($vol, $dir, $file) = File::Spec->splitpath($target);
+ my $base = File::Spec->catpath($vol, $dir, '');
+ unless (-e $base) {
+ require File::Path;
+ File::Path::mkpath([ $base ]);
+ } else {
+ 1 while unlink $target;
+ }
+
+ open my $fh, '>', $target
+ or $self->_croak("open(\$fh, '>', \$self->target): $!");
+
+ my (%seen, $id);
+ for (sort { $a->data cmp $b->data }
+ grep !$seen{$_->data}++, @{$self->{supps}}) {
+ print $fh "{\n"
+ . $self->name . ++$id . "\n"
+ . $_->data
+ . "}\n";
+ }
+
+ close $fh or $self->_croak("close(\$fh): $!");
+
+ print "Found $id distinct suppressions\n";