use Carp;
use feature 'state';
use Params::Validate qw(:types validate_with);
-use Debbugs::Common qw(getbuglocation getbugcomponent);
+use Debbugs::Common qw(getbuglocation getbugcomponent filelock unfilelock);
=head1 FUNCTIONS
sub save {
my $self = shift;
- filelock($self->{name});
+ return unless keys %{$self->{spam}};
+ filelock($self->{name}.'.lock');
open(my $fh,'>',$self->{name}.'.tmp') or
croak "Unable to open bug log spam '$self->{name}.tmp' for writing: $!";
binmode($fh,':encoding(UTF-8)');