[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion for 5.3: import() for creating a "slew" of locals
- From: William Ahern <william@...>
- Date: Tue, 19 Nov 2013 22:15:32 -0800
On Wed, Nov 20, 2013 at 04:17:26AM +0000, Sir Pogsalot wrote:
> _ENV = setmetatable(new_env, { __index = _ENV, __newindex = _ENV })
This should probably be
local _ENV = setmetatable(new_env, { __index = _ENV, __newindex = _ENV })
otherwise you are mucking with the _ENV used by earlier code in the chunk,
which may lead to unexpected behavior. But it may also be intentional. I
dunno.
- References:
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Sir Pogsalot
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, steve donovan
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Sir Pogsalot
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Sir Pogsalot
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Dirk Laurie
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Jerome Vuarand
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, steve donovan
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Sir Pogsalot
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Tim Hill
- Re: Suggestion for 5.3: import() for creating a "slew" of locals, Sir Pogsalot