[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: from: Lua Module Function Critiqued
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 9 Oct 2013 10:15:53 +0200
On Wed, Oct 9, 2013 at 10:00 AM, Philipp Janda <siffiejoe@gmx.net> wrote:
> A `local _ENV = _ENV` before, and an `_ENV = _ENV` at the top of the
> wrapping function should take care of that problem ...
That's the cleanest solution, and can be done automattically since
this is using soar to pack a Lua application into a single
self-contained archive that can be then glued into an executable using
srlua.
module() is ok (but package.seeall is both inefficient and dangerous)
and will be around for a while. The stock Debian 5.2 does indeed still
support 5.1 compat mode, so the great module rewrite can be postponed
for a few more years. In fact, most of the issues I've encountered in
porting Lua to 5.2 come from old Lua -5.0-isms which finally
disappeared in 5.2 (ditto for LuaJIT, which does not support implicit
arg in vararg functions)