lua-users home
lua-l archive

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


	Hi,

> (hopefully, this answer's Tomas' question as well)
	Sure!

> OK. Sorry about the lack of info. Here is part of my .profile
>
> export LUA_HOME=/usr/local
> export LUA_INIT="@$LUA_HOME/share/lua/5.0/compat-5.1.lua"
> export LUA_PATH="$LUA_HOME/share/lua/5.0/?.lua;?.lua"
> export LUA_CPATH="$LUA_HOME/lib/lua/5.0/?.so;?.so"
	I think a simple modification in the path's will solve the
problems (I forgot to tell you in the last message): we recommend
the use of `?/?.lua' both in LUA_PATH and LUA_CPATH.  This will
solve the link cgilua.lua -> cgilua/cgilua.lua also.  An example:

export LDIR="$LUA_HOME/share/lua/5.0"
export CDIR="$LUA_HOME/lib/lua/5.0"
export LUA_PATH="$LDIR/?.lua;$LDIR/?/?.lua;./?.lua"
export LUA_CPATH="$CDIR/?.so;$CDIR/?/?.so;./?.so"

	Installing CGILua at $LDIR/cgilua, the use of `require"cgilua"'
matches the second pattern and is equivalent to `require"cgilua.cgilua"'
(which matches the first pattern).
	To show another example, the default installation of LuaSQL
is at $CDIR/luasql.  This way, the load must be done with the call
`require"luasql.postgres"' (you should change the driver name in case
you're not using PostgreSQL) which finds the file $CDIR/luasql/postgres.so
(note that the `.' will be changed to `/'.
	As a last example, LuaSOAP should be installed this way:

$LDIR/soap/soap.lua
          /http.lua

	The use of `require"soap"' will load the core library while
`require"soap.http"' will load the extension (http.lua).

	That is!
		Tomas