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

Eyck has asked for the wisdom of the Perl Monks concerning the following question:

Are there any rules-of-the-thumb as to how much error handling in your code/library should be?

I've been told that comments should amount for the half of your code, and found that rule to be sensible in non-perl languages (and with time I found myself putting perl code in the comment and then carry on implementing it in language at hand), however I haven't heard about such simple rule conserning error handling, and I think error handling is crucial to correctnes/ease of use of your code.

When is

eval { main();#;) }; if ($@) { die "Problem: $@"; }
enough?

Is there anything but 'years of experience' to help me decide?