[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: LUA_XPATH proposal
- From: Shmuel Zeigerman <shmuz@...>
- Date: Fri, 09 Dec 2005 22:34:49 +0200
Sorry if it's been already discussed...
I thought it'd be handy if we had LUA_XPATH
(similar to LUA_PATH and LUA_CPATH).
LUA_XPATH (X stands for eXecutable; name may be different)
is a string-template containing paths for search for Lua-scripts.
It could be used by:
* Lua interpreter -- if an additional switch -x is given
* loadfile() -- if there's a 2nd parameter "x"
* dofile() -- if there's a 2nd parameter "x"
E.g., we could say:
lua -x backup.lua
asking the interpreter to search for backup.lua on LUA_XPATH, or
f = loadfile("myfile", "x")
to load myfile from some place on LUA_XPATH.