[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] compat_load - Lua 5.2 compatable load/loadfile for Lua 5.1
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 24 Jan 2012 13:13:55 +0200
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.