[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: module & 5.2
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 1 Apr 2012 18:36:15 -0300
> $ luac -o test-ml.luac ml.lua mlx.lua test-ml.lua
>
> the modules are loaded twice?
The semantics of combining several Lua programs into one using luac
is that all files are run in sequence. So
luac -o test-ml.luac ml.lua mlx.lua test-ml.lua
lua test-ml.luac
is equivalent to
lua -e 'dofile"ml.lua"; dofile"mlx.lua"; dofile"test-ml.lua"'
Why are you surprised? It's been like that for ages.