lua-users home
lua-l archive

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


On Tue, Feb 4, 2020, at 23:00, Sean Conner wrote:

>   First off, module() is no longer in Lua 5.2+, so there's that. 

module() is annoying but relatively easy to change, and the new way works with 5.1.

When I port from 5.1 while keeping 5.1 support, environments are more annoying for me, because the new way is not backward-compatible. It is possible to implement something that works like setfenv / getfenv [1] but there are gotchas.

[1] https://leafo.net/guides/setfenv-in-lua52-and-above.html

-- 
Pierre Chapuis