On lua51 I managed to get all the keywords (global definitions of functions
and tables and the functions in this tables) from some lua files which also
used require on other lua files.
The difference is that when modules are required with Lua 5.2 no globals are generated, which is why we now do
local mod = require 'mod'
You can look for entries in package.loaded to find those modules...(do a before-and-after comparison)