People learn a lot more by being shown the why of something than from just being hit upside the head and told not to do it, no matter how experienced the person doing the hitting.
No, you're missing the purpose of my "don't do this" post.
Going back to the innoculation metaphor, I'm providing emergency-room treatment. Surely, this is not a substitute for a person going out to learn how to avoid catching communicable diseases. That happens later (or hopefully earlier).
Getting back to the literal issue here, I'm just saying "stop, don't". And that's a first round of response. But I'm not about to quote the plenty existing literature about why the solution is broken. If there was something not well known about why the solution is broken, I'd have provided more pointers. If you review my posts, you'll see that I've done that frequently.
But knowing that you have to do an atomic operation to provide a lock is fairly basic knowledge. And as I showed in my google reference, the first dozen hits for "perl lock" were all quite informed, so there's almost no excuse for the code that triggered my outburst, except that this is a KLB (in #perl parlance) and will likely lead others astray unless muzzled until they get a clue.
-- Randal L. Schwartz, Perl hacker
Is it possible that PM needs the Monks of the Round Table whom merlyn could advise of the horrid mistake being made by King Author, and could take the time to provide corrective assistance with a gentler hand?
Perhaps merlyn, whence stumbling upon dangerous code, could then post a warning, e.g. "This code may have dangerous side-effects and is awaiting review by the Monks of the Round Table."
May the Source be with you.
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
and could take the time to provide corrective assistance with a gentler hand?
No gentleness is needed, just assistance.
Saying "this sucks, there are better ways" without saying what the better ways are is just useless.