|There's more than one way to do things|
Re: Re: Less-than-helpful warningsby jpfarmer (Pilgrim)
|on Dec 11, 2003 at 17:46 UTC||Need Help??|
according to the message I get when I use the 'use diagnostics' with this code.
Consider this trivial case:
Without using diagnostics, I get this:
Unquoted string "c" may clash with future reserved word at test.pl line 5. Argument "c" isn't numeric in addition (+) at test.pl line 5.
However, if I do use it, I get a much more informative error:
Unquoted string "c" may clash with future reserved word at test.pl line 5 (#1) (W reserved) You used a bareword that might someday be claimed as a reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine. Argument "c" isn't numeric in addition (+) at test.pl line 5 (#2) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.
Sure, in the case I've provided it isn't especially helpful, but it can be useful for tracking down more bizarre errors by giving some suggestions.