I've been on the -w bandwagon since day one so at least I don't have those potential messes to look forward to.
However, with the switch to use strict I'm not sure how to handle my globals.
I have three libraries I use for different purposes. I've included them into different scripts using "require". One of these libraries establishes about a dozen global vars that I expect to be floating around in all of my scripts.
Eventually I'll start using proper package::var type syntax. But at the moment I'd like to sneak up on that one script at a time.
Hence I'm looking at the use of "use var" or "our" to declare these globals in my libraries.
Is it true that both will work? Or will I lose scope when the program returns from the required library into the main script?
As you might guess I've been doing all my Perl on street corners and now I'm trying to learn it gooder. ;-)
Claude
p.s. If you know of a tutorial for "Strict after the fact" let me know.
In reply to "use vars" vs. "our" or Strict after the fact by Xxaxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |