lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2012/4/1 Petite Abeille <petite.abeille@gmail.com>:
> On Apr 1, 2012, at 4:23 PM, Jerome Vuarand wrote:
>
>> Your points (2), (3) and (4) were only possible in some circumstances.
>
> For the record, all of this was possible for Nanoki under 5.1. And no, it doesn't use seeall anywhere. In short, this is not a theoretical, speculative issue, but a concrete, immediate loss of functionalities. A big step backward.

How did you do it? Because the following doesn't run in 5.1 if in the same file:

local print = print

module("foo")

function foo_func()
	print("foo")
end

--------------------

local print = print

module("bar")

function bar_func()
	print("bar")
end

I get that:

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.