[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Setting the environment for a loaded script
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 17 Apr 2014 14:15:10 +0200
2014-04-17 14:03 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
> On Thu, Apr 17, 2014 at 1:51 PM, Milind Gupta <milind.gupta@gmail.com> wrote:
>> it to run in the current environment. How should I set the script
>> environment and also pass all the current upvalues to the script?
>
> There are two questions here: the first has several straightforward
> answers, depending on what Lua version you're using. The second is
> tricky, because upvalues are like locals - they're created at compile
> time.
In fact, they _are_ locals, but local to a different scope.