|
So, those of us writing Lua modules should make the tables we define our modules in as either local or package.loaded[...] rather than making a global and returning it?Could I put up the suggestion that the module adds nothing to the global environment, but instead just returns the module? (that is, a NULL argument to luaL_register)... I believe this is a practice that should be followed by all lua modules, and infact that argument to luaL_register should be scrapped...This will be the recommendation in Lua 5.2. And luaL_register will be deprecated to reflect this.