in reply to Is "die" the best way to be atomic?

die is more of a friend than its name suggests. In fact, if your code needs to do some mandatory cleanup before its death, you can even trap the dies using eval or Carp and have a special death handler deal with the cleanup for you, after which time it's your choice whether you let your script return to duty or terminate execution.

If you have something going on that you want your script to complain about but not necessarily die, you can also use warn. It just spits a message to STDERR and continues on.


Dave

  • Comment on Re: Is "die" the best way to be atomic?