lua-users home
lua-l archive

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


On 15 November 2013 17:51, Jose Torre-Bueno <jtorrebueno@cox.net> wrote:
>
> I notice that although I have 5.2 installed package.path still has 5.0 in
> it:
>
> Joses-MacBook-Pro:luawork jtorrebueno$ lua
> Lua 5.2.0  Copyright (C) 1994-2011 Lua.org, PUC-Rio
>> =package.path
> /usr/local/share/lua/5.0/?.lua;?.lua
>
> Does anybody have a theory how this could have come about?  I have LUA_INIT
> cleared so it is not happening there.  Where does Lua get the initial value
> of package.path?
>
>
> Jose de la Torre-Bueno, Ph.D.
> Empowered Energy Solutions Inc.
> Intellectual Property & Technology Management
> T (619) 977-0553
> F (760) 295-7119
> jtorrebueno@cox.net
>

Lua 5.2 initialises package.path from the LUA_PATH_5_2 environment
variable or LUA_PATH if that doesn't exist. If neither environment
variable is defined, it uses the default path defined in luaconf.h.

http://www.lua.org/manual/5.2/manual.html#pdf-package.path