A :local modifier would do the trick. The text in the drafts should be
more explicit about there being a single global namespace for all scripts.
there is only one script, it just so happens that it may consist of more
than one file :-)
I can't help wondering if you are making a few assumptions:
- a single author wrote/maintain all the scripts
- all the scripts are quite small or
- all the scripts are sufficiently simple that they can be recalled as a whole
At one level aren't namespaces a tool for protecting you against pollution from
some other part of a much larger or multi-authored script. Other tools for
breaking down larger scripts would include things like functions an files. I'm
nervous that by declaring that all variables must be more than just file-scope
global that we create a problem for ourselves when/if scripts end up getting
seriously large. I recal seeing a script from one of my customers which was in
excess of 64K!
Are there security concerns too. Server Admin controls script A which includes
script B which is controlled by an end-user. The end user could declare a
variable in script B that would alter the behaviour of the remainder of script
A after the include?
Nigel