The writing of the modules had to have strict in them. Why ? Because the folks that would be using the modules would be stricting, hence I couldn't have a module that would break other applications.Huh? Strictness is lexically scoped - any module that uses strict can use a module that doesn't use strict. It won't break. In particular, any code that runs fine with strict, will continue to run fine, and in exactly the same way, if you remove the line use strict;.
Some of my code started breaking, because I had the dirty habbit of declaring a global variable in the main program, and simply reusing that same variable in another do'ed file.Ah, yes, usually not a good idea. But use strict; won't prevent you from using global variables; it doesn't even prevent you from using cross-scope variables. Nor does using lexical variables implies you are using strict.
I promise that from this day forward, any script that comes in contact with me will have use strict; added to the top.Yes, and? It's a popular myth that using use strict; makes you a better coder, or improves your code. It doesn't. Your stories implies that your code improves by using lexical variables instead of package variables. That's the important lesson. Not the strict. The latter only helps you to think more carefully when using package variables.
In reply to Re: My confession - I'm now strict-ing...
by JavaFan
in thread My confession - I'm now strict-ing...
by Massyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |