in reply to Re^3: My confession - I'm now strict-ing...
in thread My confession - I'm now strict-ing...
1) By forcing you to declare your variable names - even if only with our - it offers a good degree of protection against inadvertently creating new variables when you intend to reference existing ones, but misspell them.
2) A my at the top-level scope of a module will keep that variable contained to the module, preventing weird inter-module dependencies such as those the OP encountered with his wanton use of do.
But, yes, you are right in that just blindly sticking my/our in front of every variable that strict complains about won't get you the full benefit of strict. Like any tool, it works best when you think about how you're using it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: My confession - I'm now strict-ing...
by JavaFan (Canon) on Jan 28, 2010 at 09:11 UTC |