in reply to Error reporting in modules

My rules are currently along the lines of:

If value is unexpected, but harmless, return warning

Eg, if sub is expecting to receive a number (including 0), but receives an empty string, assume number is zero, but warn anyway.

If valid value is necessary to continue, die

Eg:

open(LOG,"<logfile") || die "Can't read log file for parsing - $!";

exceptions

I have a bunch of sudo scripts that have to be very locked down. I expect the calling script to know exactly what it's doing. If it doesn't I assume there's some bad juju going on and die - even if it could technically continue.

I also use a trace through caller() to help with debugging, but that's another issue :)

cLive ;-)