Roberto once suggested that globals have to be declared as well. So you have to declare which globals you want to use, and if you declare no globals at all, Lua would act like it does now (allow any access).See also http://lua-users.org/lists/lua-l/2006-10/msg00206.html
That is quite interesting. But this solution (if I understand it
 correctly) depends on a Lua function declared somewhere else. So
 Lua files now depend on each other at parse time. Currently you
 can parse each Lua file by itself. We actually use that feature to
 load pre-compiled scripts to embedded systems at runtime.
 --
 Thomas