lua-users home
lua-l archive

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


2014-08-06 4:00 GMT+01:00 Stefano <phd.st.p@gmail.com>:
> In 'lua [options] [script [args]]' it seems that neither _G.loadfile nor
> _G.loadfile are used to execute 'script', is this correct?

"neither _G.loadfile nor _G.loadfile": which one is wrong?

> Also rephrased, is there a way to have 'lua -lDSL test.lua' pre-process
> tests.lua before execution? I am aware I can use 'lua DSL test.lua' instead
> with an appropriate DSL lua script.

You can write 'lua -lDSL -e "assert(loadfile(\"test.lua\"))()"' if
your module changes loadfile (or loadfile).