Re: Eliminate dynamic variables entirely?
[email protected] (Nathan Wiger) Tue, 15 Aug 2000 22:35:02 -0700
| Newsgroups | perl.perl6.language.strict |
|---|---|
| Message-ID | <[email protected]> |
Kai Henningsen wrote: > > 1. Package variables $package::var, presumably you'd have to declare those > and the default would be > 2. lexical variables, Not bad, but I think #1 violates Laziness if I hear you right. Let's add a "global" or "your" keyword to do this inside a package: package MyPackage; our $var = 'val'; # package-wide, lexical your $VAR = 'val'; # package-wide, global, $pkg::VAR If this is what you meant, nevermind... > Furthermore, in the "more rope" department, it might be possible to make > local() work on my() variables this way. I'm still unsure if this is a good thing. I think it is, but it's worth some pondering. -Nate