lua-users home
lua-l archive

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


Ok, thanks a lot, both of you.

Is it possible to add a note in the given link to said it changed in next version ? (I'm still using Lua 5.1)

Thanks

Laurent


Le Dimanche 16 octobre 2016 19h16, Hisham Muhammad <hisham.hm@gmail.com> a écrit :


On Oct 16, 2016 08:26, "Laurent FAILLIE" <l_faillie@yahoo.com> wrote:
>
> Hello,
>
> As per the documentation (https://www.lua.org/pil/8.1.html), global variable LUA_PATH should have precedence against environmental variable, it it seems it hasn't :
The page you linked refers to Lua 5.0. This has changed since. The variable inside Lua that controls the package path is now called package.path and the environment variable is still called LUA_PATH. For the .so modules, the variables are package.cpath and LUA_CPATH.
Since Lua 5.2, there are also versioned variants of the environment variables: LUA_PATH_5_2, LUA_CPATH_5_2, LUA_PATH_5_3, LUA_CPATH_5_3. These take precedence over the unversioned ones when available.
-- Hisham