Now is there any way this behaviour be altered in such a way thatThere was some discussion of this around Perl 6, but it was abandoned. My recollection was that it was dumped partly because it presents real technical problems and partly out of hidebound conservatism and pigheadedness, but I forget.1) By default all the variables have local scope (no need of my()).
2) We should be able to use a keyword (say global()) to declare a variable having global scope() ?
The discussion is archived here. In my opinion, the discussion was unusually thoughtless, and can stand as a good example of what was wrong with the Perl 6 RFC discussion in general.
In reply to Re: Default Scope Behaviour
by Dominus
in thread Default Scope Behaviour
by NeoPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |