in reply to Re^2: Trying to create a common "variable library"
in thread Trying to create a common "variable library"
... the functionality provided by this pragma has been superseded by "our" declarations ...
The thing is that the extra file implies a separate lexical scope, so you can't use our (without additional hoops), because its effect is lexically scoped. Even if the docs call use vars "superseded", it still has its occasional uses, because the functionality isn't the same as "our" in every respect.
In the particular case of what the OP wants to use this for (i.e. having some common variable definitions to be included in several scripts), I don't really see an advantage of creating a "proper" module as you call it, i.e. putting the global variables in a different namespace first, only to then alias them all into the current package using Exporter. As long as there's nothing else in the module, where's the benefit?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Trying to create a common "variable library"
by fullermd (Priest) on Jul 21, 2010 at 13:57 UTC |