in reply to Programming style question on where to use die
I'd use an exception mecanism if the error is unexpected or rare, or it'd be difficult to test in normal usage. For example, the HTML generation functions of CGI.pm would be incredibly awkward to use if they had an error return value, because you'd be forever storing the result, testing it, and then moving along if it wasn't an error.
Just my 2-ish cents. {grin}
-- Randal L. Schwartz, Perl hacker
|
|---|