lua-users home
lua-l archive

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


This method will fail if there are command line parameters.

Unfortunately, the conclusion was that there seems to be no fail-proof method.

This is a very important feature but there is zero interest from the Lua team to provide a reliable method.

You mean like this?
...
Here's my "module":

if ... then
 print("I was included as a module")
 return {}
end

print("I was executed as a program")