lua-users home
lua-l archive

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


> $ 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.