lua-users home
lua-l archive

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


I already tried suggesting this
(http://lua-users.org/lists/lua-l/2006-02/msg00461.html).

  LUA_5_1_INIT
  LUA_5_1_PATH
  LUA_5_1_CPATH

	The ability to define these PATHs with a variable part would help:

LUA_PATH="/usr/local/share/lua/$VERSION_NUMBER/?.lua..."

	A tricky init-file could do the job either:

if VERSION_NUMBER == "5.0" and not _COMPAT51 then
	assert(loadfile("/usr/local/share/lua/5.0/compat-5.1.lua"))()
end
package.path = string.gsub (package.path, "5.%d+", VERSION_NUMBER)
...

	On both cases, VERSION_NUMBER could be obtained from _VERSION
variable:

VERSION_NUMBER = string.gsub (_VERSION, "^Lua (%d+%.%d+).*$", "%1")

	I think this approch is better than changing .c files don't you
think?

We can get by without the Lua authors making a standard, just as we do
regarding versioned names of the lua and luac executables.  Really only
the people doing packaging need to agree.
	This (the support (?) for multiple installed versions) is an
old subject usually standed out by them, unfortunately.

	Tomas