lua-users home
lua-l archive

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


On Sun, Jan 22, 2012 at 1:03 AM, HyperHacker <hyperhacker@gmail.com> wrote:
> Personally I think setfenv will be the function I find myself
> replacing the most...

Here's the Lua 5.2 compatibility functions from Penlight, which are
all in utils.lua, line 200

https://github.com/stevedonovan/Penlight/blob/master/lua/pl/utils.lua

The setfenv implementation is by by Sergey Rozhenko, see:

 http://lua-users.org/lists/lua-l/2010-06/msg00313.html

Note that utils.lua does not depend on any other module; anyone is
welcome to mine it (or the rest of Penlight) for useful snippets.

steve d.