http://www.perlmonks.org?node_id=1199785


in reply to [RFC] File::Replace

Do not assume that it will be an atomic operation – it very likely will not be. There can also be issues with directory caches on network file systems. (Some remember that a file does not exist, and continue to say that it does not when it does. And vice-versa.)

Replies are listed 'Best First'.
Re^2: [RFC] File::Replace
by haukex (Archbishop) on Sep 21, 2017 at 07:05 UTC
    Do not assume that it will be an atomic operation

    Absolutely, which is why I make a point of that both in the root node and the module's documentation - the module's job is to do the rename. I'll highlight that caveat a little more in the next version.

      Documentation sections which specifically address NFS (at least NFSv3 and NFSv4), would be beneficial. There are many subtle issues regarding both client and server-side (filename) caching, in this very popular network filesystem, which directly intersect what your module will be doing. Freely reference good external web-sites and pages ...