lua-users home
lua-l archive

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


> ...Which is a terrible idea, basically emulating PHP's
> REGISTER_GLOBALS that has lead to so many security issues over the years.

Really? I don't see how *reading* an environment variable can be a security
problem given that you can read it with os.getenv. But of course I don't
know the first thing about PHP.

> but don't go messing with the global metatable
> like that (especially without considering what's already in it).

The __index metamethod does not mess with what is already in _G.