There's more than one way to do things | |
PerlMonks |
Re^3: Modifying Arrays passed by reference to subroutineby Marshall (Canon) |
on Jun 09, 2009 at 10:47 UTC ( [id://769840]=note: print w/replies, xml ) | Need Help?? |
This reference to perllexwar basically says that the problem can be that you turn warnings ON for more than maybe you want to. I figure that more aggressive warnings are usually better than less aggressive. If you get warnings that you decide are not warranted, then you can "crank down the warning level" for that segment of code, but usually (in my opinion) that's the wrong thing to do unless you are extremely clear about why you are going that. As far as parm validation goes, there is a whole bunch that didn't get talked about for this code example....use of prototypes in Perl functions, etc. In this case the issue was defined or not which is different than say param #3 should be between 4 and 12. In any event, I think that it is wrong to return silently when the sub fails. Update: In any event, I think that it is wrong to silently return a valid return value when the sub fails.
In Section
Seekers of Perl Wisdom
|
|