|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^4: 'require/use' scoping ("scope")by shmem (Canon) |
| on Jan 29, 2008 at 21:34 UTC ( #665010=note: print w/ replies, xml ) | Need Help?? |
|
When you talk about scope in Perl, the time it makes any sense is in lexical scoping. Any other use of the concept is just wanking. Well, not quite. I can switch, in any lexical scope, the package. Doing so, as long as the package switch lasts, I can access thingies of that package - subroutines, globs, variables (except file scoped things like my() variables) - without qualifying them. It's a scope! and I can enter and leave it whenever I want! There's more to scopes in perl than just blocks! A scope is de- and confined by its boundaries. Do you have a better "synthesis term" for what tye, I and you are saying? If you haven't, putting off those considerations as "wanking" is just... er, can't get an appropriate term right now; have to think about it... --shmem
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||