Tie::YAML doesn"t write to tmp file first?

Tie::YAML doesn"t write to tmp file first?

am 23.12.2007 15:34:04 von robert.nicholson

So the save method looks like this

sub save{
my $self = shift;
my $filename = $self->filename;
open my $fh, ">:raw", $filename or croak "$filename: $!";
print $fh Dump(damn_scalar($self));
close $fh;
return 1;
}


That means that if it's interrupted during save you've lost your
original file.

Instead of doing that it should be writing to a temporary file first
and then renaming
it later.