[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Module system curiosity
- From: Matthew Wild <mwild1@...>
- Date: Sun, 30 May 2010 16:21:44 +0100
On 30 May 2010 16:09, Florian Weimer <email@example.com> wrote:
> * Matthew Wild:
>> See when I last brought this issue up:
>> http://lua-users.org/lists/lua-l/2010-01/msg00411.html (the thread is
>> an interesting read, even though it doesn't present an effective
> I think you might be approaching this from the wrong end.
I'm not sure - my concern isn't protecting the default environment as
you state, but rather allow my re-environmented (I need to use this
phrase more) functions to load modules, independent of each other.
As it is, when they call require() most module tables end up out of
their reach, unless I provide them with an __index on their
environment to _G, and then suddenly they aren't so independent from
the main program - which isn't what I wanted.