OK, thanks for clarifying. I'm just seriously surprised that Perl, which is an extraordinarily sensible language in most other ways, doesn't have a more definite response to this kind of mistake - one that can easily be made unintentionally - in coding. I'm even more surprised that it doesn't seem to bother other people.
--
I hate storms, but calms undermine my spirits.
-- Bernard Moitessier, "The Long Way"
| [reply] |
I hear what you're saying oko1, but isn't use warnings a valid response? I mean, where would you draw the line with strict if you start looking at all the other problems you can run into?
| [reply] |
The field of problems that are a) always errors, b) detectable, and c) easily made unintentionally is not very large. Also, the docs for 'strict' specifically mention 'vars' as being intended to prevent variable suicide - which it fails to do in this case. Currently, the only thing that we've got is a mildly-phrased warning; in fact, it's classified as 'misc' in the warnings hierarchy.
That just seems totally inappropriate to me - particularly when compared to the way this kind of error is treated in other languages.
--
I hate storms, but calms undermine my spirits.
-- Bernard Moitessier, "The Long Way"
| [reply] |