The attached patch adds baseline support for Lua 5.2, while maintaining
compatibility with Lua 5.1.
Since luaL_register() (in C) and module() (in Lua) are still used, this requires a Lua 5.2 compiled with LUA_COMPAT_MODULE defined in luaconf.h.
Does this mean it is possible to use prosody with lua-5.2? Asking for a Gentoo-bug lying around unresolved since 2012.
Lua 5.2 support is in the 0.10 branch, however it has had limited testing. Therefore we're not planning on officially supporting it for the 0.10 release. However it is certainly an option for those that need it, and we'd welcome any feedback and bug reports related to running under 5.2.
We still recommend that (stable) packages should stay with Lua 5.1 until the next major release (after 0.10).
This refers to the C code, not overall Lua 5.2 support in the rest of the (Lua) codebase.