Perl Monk, Perl Meditation | |
PerlMonks |
Re (tilly) 5: Seeking Feed backby tilly (Archbishop) |
on Jul 05, 2001 at 17:52 UTC ( [id://94101]=note: print w/replies, xml ) | Need Help?? |
I was not commenting on the error being silent or not. I am commenting that your initial version failed to log critical information that would make it possible to debug the problem later. And no matter how controlled the environment may be, you are not going to convince me that you won't ever have bugs to track down. I am glad that your current example does that better. It does not do it well enough to make me happy, but it is better. Here is a better version of the same thing that you have: Why better? Well suppose that some bright sysadmin gets the idea of having your data mounted from another machine over NFS. (This is not an unreasonable thing for a sysadmin to have reason to do.) With the revised version you will get notified that flock no longer works. With the original version the error would be silent until someone noticed sporadic loss of data over 6 months and thought to wonder why. (At which point you read your code and have no a clue where it could fail.) My points?
In Section
Seekers of Perl Wisdom
|
|