After being bitten one too many times, I'd like to more aggressively test my method parameters and return values. What is the best way to do this?
Should I check defined() for each necessary parameter, or is that overkill since "use warnings" will tell me if I try to use it without being initialized?
Do I check every single parameter using ref() to see if it's the type (scalar/hash/array) that I'm expecting?
Do I do the same for every return value?
I've looked for style guides about how to do this in perl, but I haven't come up with a satisfying answer. What do you all do?
BTW, my program is large, OO, and spread across multiple files.