Subject: | how to manipulate "tempXXXXX" if atomic option is true |
File::Slurp version 9999.29
We wanted to use write_file() to atomically create a file inside a directory. Unfortunately the directory is observed by another daemon process that detects the intermediate "tempXXXXX" file. The daemon process would ignore hidden files for example. Could we change the behaviour in the following way:
If the atomic option is true and if the option values contains at least 5 X characters (for example { atmoic => ".tempXXXXX" }) then the option value should be passed as is to
284: (undef, $file_name) = tempfile($opts->{atomic}, DIR => $dir, OPEN => 0);
}