smackdab has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have an app that writes out HTML files and am using IO::AtomicFile to write it out. I believe this will make sure users get the whole HTML file if they are refreshing the browser (not easy to test though ;-)
Is there another technique I should be using to read my config type files? I assume there can be cases where the user is doing something (other than locking it with an editor) that could cause the read to fail... (I have seen what I think is this, but again, difficult to test) Should I try to read the file, say 10 times with a .1 sec inbetween or ???
thanks for any best practice guidelines
I have an app that writes out HTML files and am using IO::AtomicFile to write it out. I believe this will make sure users get the whole HTML file if they are refreshing the browser (not easy to test though ;-)
Is there another technique I should be using to read my config type files? I assume there can be cases where the user is doing something (other than locking it with an editor) that could cause the read to fail... (I have seen what I think is this, but again, difficult to test) Should I try to read the file, say 10 times with a .1 sec inbetween or ???
thanks for any best practice guidelines
Back to
Seekers of Perl Wisdom