use JSON::XS;
use Mubot4FB::DB;
use File::Temp qw/tempfile/;
+use File::Copy qw/move/;
use constant DATA_VERSION => '0.1';
my ($fh, $tmp_file) = tempfile("tmpjsonXXXXXX", DIR => $tmpdir);
print $fh encode_json($out);
close($fh);
- rename $tmp_file, $me->{cfg}->{json_path} || warn 'can not rename from ' . $tmp_file . ' to ' . $me->{cfg}->{json_path};
+ move $tmp_file, $me->{cfg}->{json_path} || warn 'can not rename from ' . $tmp_file . ' to ' . $me->{cfg}->{json_path};
}
}