[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compat-5.1 very broken.
- From: Tiago Dionizio <tngd81@...>
- Date: Sat, 23 Apr 2005 02:18:09 -0700
On 4/22/05, email@example.com <firstname.lastname@example.org> wrote:
To specify a file name in LUA_INIT, the string needs to start with a @
char, or else it will be interpreted as a lua script.
> E:\Lua\luasocket-2.0-beta3\tests>lua testsrvr.lua
> lua: LUA_INIT:1: `<name>' expected near `/'
Here it tried to execute the lua script with contents
"e:/lua/lua-5.1w5/bin/compat-5.1.lua" which is not valid sintax...
> E:\Lua\luasocket-2.0-beta3\tests>set LUA_INIT=@<ROOT>/compat-5.1.lua
> The system cannot find the file specified.
The problem here is the use of '<' and '>' which will tell the windows
console to interpret as redirection files. It will try to read from
file "ROOT" and output the result of the command "set LUA_INIT=@" into
"/compat-5.1.lua". Since the file ROOT was not found nothing was
> E:\Lua\luasocket-2.0-beta3\tests>set Lua_Init=compat-5.1.lua
You should have typed "set LUA_INITemail@example.com".
I hope this helps you understand what you were doing wrong.
For more information, see: http://www.lua.org/manual/5.0/manual.html#6
"Before running any argument, the interpreter checks for an
environment variable LUA_INIT. If its format is @filename, then lua
executes the file. Otherwise, lua executes the string itself."