[luatex] Lua 5.2.

Paul Isambert zappathustra at free.fr
Mon Jan 31 14:38:38 CET 2011

Le 31/01/2011 14:27, Philipp Stephani a écrit :
> Am 31.01.2011 09:03, schrieb Ulrike Fischer:
>> Am Fri, 28 Jan 2011 00:21:53 +0100 schrieb Philipp Stephani:
>>>> Most importantly, module() is deprecated, so packages should sooner or later do without.
>>> What is the preferred way to implement modules then?
>> I found a message which says:
>> "- module and luaL_register deprecated, replaced by luaL_newlib and
>> luaL_setfuncs."
> Thanks, but these are C functions that wouldn't be of much help if you
> want to write a Lua module. I'm asking this because I have no experience
> in Lua and don't want to write obsolete code right from the beginning.

Then really read chapter 15 of PIL: http://www.lua.org/pil/15.html
The cool thing is that the online version documents Lua 5.0, and 
module() was introduced in 5.1.

[Another change worth mentioning in 5.2: "arg" in e.g.

function myfunction (...)
   for a, b in ipairs(arg) do

won't be defined anymore (it already behaves strangely anyway). Adding 
"arg = {...}" at the beginning does the job.]


More information about the luatex mailing list