in reply to file handling question
IO::AtomicFile may be what you want, but it has nothing to do with file locking. If you look at the source, you'll see that a temporary file is written, and renamed on close. The atomic nature of rename in the OS is what accomplishes that. A weakness of this module is that the temporary file name is not safe if two instances open the same file. Both temporaries will be giwen the same name, with bad results.
Voluntary or mandatory flock is another animal. It is able to handle the retry strategy you mention, or else to block, waiting to the lock to become available. I'm not sure whether Apache honors voluntary locks for reading html files, perhaps another monk knows.
Some file systems and OS's are weak in handling concurrency, but most unices are ok.
After Compline,
Zaxo
|
|---|