[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 environments and changing a loaded file environment
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 9 Aug 2010 08:58:42 -0300
> I'm trying to decide how best to change the environment of a loaded
> "script" file such that it can be given a brand new environment and
> re-executed multiple times without recompiling the script (loadin).
One solution which has been posted here is to add "_ENV=..." at the top
of the script before compiling it. Then you can give the environment
when you call it. This technique only works for scripts that do not
use args (...).