[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Modules with standalone main program
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 24 Feb 2018 10:25:10 +0200
This has come up before, but I can't remember or find the answer.
Is there a test that allows the following logic?
if test then -- module was invoked by 'require'
-- continue with main program
The best I can come up with is to insist on 'lua -i' for the
standalone, and use os.exit if I don't want to fall back to Lua.