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

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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.

Site Timeline