This is another old library of mine, that I decided to completely re-do today.
It adds an _L (locals) and _U (upvalues) table to Lua, similar to _G. It's intended for debugging, but may be useful for other purposes.
Note that _L and _U cannot be used to declare new locals or upvalues, but can be used to modify or access them.
This also allows you to easily add them to the global table, via something like this:
Code: Select all
for k, v in pairs(_L) do _G[k] = v end
for k, v in pairs(_U) do _G[k] = v end
I dunno if anyone will really find this useful in the long run, but I thought I might as well release it anyway.