lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 30 May 2010 16:09, Florian Weimer <fw@deneb.enyo.de> 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
>> solution).
>
> 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.

Matthew