[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket & require & 5.1 howto?
- From: David Burgess <dburgess@...>
- Date: Sun, 6 Feb 2005 01:16:58 +1000
> Is that luasocket-2.0-beta2?
beta3
> How do I use LuaSocket with Lua 5.1?
Change a handful of lines of code.
Remove compat.h, change luaL_module to luaL_openlib
package.loaded["base"]=_G in socket.lua
thats it.
> If yes, I'm not quite sure how to make sense of the following
> environment variables mentioned in INSTALL:
>
> LUA_INIT=@/Users/diego/tec/luasocket/lua.lua
disappears in 5.1
It means the named script will run at lua startup
> LUA_PATH=/Users/diego/tec/luasocket/?.lua;?.lua
Where to find the lu scripts
> LUA_PATHLIB=/Users/diego/tec/luasocket/?.dylib;?.dylib
becomes LUA_CPATH in 5.1 , where to find the C libraries
>
> When trying to import, say, "http", I get:
>
> require( "http" )
>
> lua: Example.lua:174: package `http' not found
See above.
> For the record, I'm using lua-5.1-work4 on Mac OS X 10.3.7.
Then use luasocket beta3