lua-users home
lua-l archive

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


> > I can't find information about LUA_PATH and LUA_CPATH changes in Lua
> > 5.2 and Lua 5.3 manuals. What exactly do you mean?
> 
> Just take a look on cut betwen "==="'s in that my message, you're answered on.
> 
> Lua<5.2 and LuaJIT has path/cpath order which makes it to prefer "local" 
> modules (from cwd) over "system-wide" ones.
> It was quite usefull behaviour, especially for testing.
> But 5.2/5.3 introduced new order, where system-wide paths are more preferable  

The new order makes the default more secure (even more with the new -E
option). For those that know what they are doing (e.g., for testing), it
is trivial to have environment variables with your prefered path, like
this:

  LUA_PATH=./?.lua;;
  LUA_CPATH=./?.so;;

-- Roberto