[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: module & 5.2
- From: Elias Barrionovo <elias.tandel@...>
- Date: Mon, 2 Apr 2012 13:44:36 -0300
On Mon, Apr 2, 2012 at 9:06 AM, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
> How did you do it? Because the following doesn't run in 5.1 if in the same file:
> (...) snip (...)
> lua: test15.lua:13: attempt to call global 'module' (a nil value)
>
> So either you need some boilerplate, or you constrain the way you write modules.
>
I believe what's happening is that since first module call clears the
global namespace, the interpreter can't find any reference of the
global module function at the second call. So one should do
" local module = module "
before the first module call.
--
NI!