http://qs1969.pair.com?node_id=342682


in reply to How to handle Errors?

The canonical way to handle errors in Perl is to use die and eval. You throw your errors using die and catch them using the block form of eval. You can even throw objects with die and catch them with eval, for fine-grained handling. There are many examples in the various manuals.

Do NOT use Error, because it can cause memory leaks in a number of situations.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose