This is not necessary in the actual meaning of the word. That is, the program does not require work from it. People often forget what they mean.
However, if your question is: “Do warnings be strictly resolved?”, The answer is no. You can see what reading the documentation strictly does.
warnings are often useful for indicating issues that you need to fix. However, Perl warnings do not need to be fixed, so your program may continue even if it issues warnings.
Some people will tell you to always use warnings, but they make such a rule, so they don’t need to think about it or explain to people who will not think about it. This is an unpopular position to say something other than “always use warnings”.
warnings are a tool for developers, and if people who see warnings don’t know what they represent and what to do with them, they are likely to just cause annoyance or confusion. I saw several examples when new pearls started to give new warnings for programs that then filled disks, since no one controlled the log files.
I have a much more subtle rule "use warnings when you do something about them, and do not use them if you do not want to."
I don’t even say this: "Always write without warning." There is a lot of code that I write that I will run exactly once, either from the command line, or in other situations where I don't care about sloppiness. I don’t like giving dirty warning code to other people, but I don’t get hung up on the little things that I do for myself.
brian d foy Jul 06 '11 at 18:18 2011-07-06 18:18
source share