[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] mergelua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 16 Oct 2011 15:24:52 -0200
> In 5.1, one can easily bundle multiple modules per Lua file, or
> concatenate multiple modules into one file, or package the entire
> enchilada in one binary file, courtesy of luac, without any fuss.
In Lua 5.2, I think you can easily write something like the following,
for multiple modules in one file:
do -- Module 1
local _ENV = mymodule("mod1")
...
end
do -- Module 2
local _ENV = mymodule("mod2")
...
end
where 'mymodule' is a somewhat trivial function.
-- Roberto