Looks to me that some order is needed in the way we are
slinging around definitions, lest confusion overcomes us.
Let us (sensibly) define global a variable that can be accessed by any point of your program. By this token, then, package variables have global scope: the shorthand that allows one to omit the package name is actually irrelevant to the visibility issue.
On the other hand lexical (my) variables can never achieve global status, as they are never inserted into any symbol table: their visibility is determined by the outermost enclosing block (or, file). This is the reason why 'strict vars' will not affect lexical variables.
On a third hand :), lexical variables are refernce counted, (whereas package variables are not: how copuld they?) and can therefore assume a sort of global visibility if properly wrapped in code (closures).
Cheers,
alf
In reply to Re: About packages and scopes
by alien_life_form
in thread About packages and scopes
by nlafferty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |