lua-users home
lua-l archive

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



On 17-Aug-05, at 6:49 PM, Chris Marrin wrote:

To be clear, I am suggesting they be placed in the local namespace, as set by setfenv(). I don't like the idea of polluting the global namespace.

That was basically what my snippet of code did, in fact. The theory was that the script file (assuming that is what it was) would have had its environment set before being run. I also took care to call 'require' in the environment of the caller rather than in the environment of the utility function, which might be important in a sandboxed environment.

As things are developing, I'm not even sure that "global namespace" is a truly meaningful concept. "Initial namespace" might be a better description.