http://qs321.pair.com?node_id=114921


in reply to Errors in Module - What to do with them.

Some would say it depends on how fatal the error should be. If you die, and document that that's what happens, you can let the caller deal with it with an 'eval' if he likes, and the error message will be in $@. If there's an error message to report, I usually prefer that to returning undef and putting the error message in some package variable (at least lately).