[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (rc6) now available
- From: Daurnimator <quae@...>
- Date: Thu, 8 Dec 2011 10:20:33 +1100
On 8 December 2011 06:06, Florian Weimer <fw@deneb.enyo.de> wrote:
> * Luiz Henrique de Figueiredo:
>
>> We expect this release candidate to be the final version of Lua 5.2.0,
>> unless serious glitches are found soon.
>
> The library search path seems wrong to me:
>
> src/lua: /tmp/t.lua:1: module 'lpeg' not found:
> no field package.preload['lpeg']
> no file '/usr/local/share/lua/5.2/lpeg.lua'
> no file '/usr/local/share/lua/5.2/lpeg/init.lua'
> no file '/usr/local/lib/lua/5.2/lpeg.lua'
> no file '/usr/local/lib/lua/5.2/lpeg/init.lua'
> no file './lpeg.lua'
> no file '/usr/local/lib/lua/5.2/lpeg.so'
> no file '/usr/local/lib/lua/5.2/loadall.so'
> no file './lpeg.so'
>
> I think the correct order would be:
>
> src/lua: /tmp/t.lua:1: module 'lpeg' not found:
> no field package.preload['lpeg']
> no file '/usr/local/share/lua/5.2/lpeg.lua'
> no file '/usr/local/share/lua/5.2/lpeg/init.lua'
> no file '/usr/local/lib/lua/5.2/lpeg.lua'
> no file '/usr/local/lib/lua/5.2/lpeg/init.lua'
> no file '/usr/local/lib/lua/5.2/lpeg.so'
> no file '/usr/local/lib/lua/5.2/loadall.so'
> no file './lpeg.lua'
> no file './lpeg.so'
>
> The idea is that a module is not picked up from the current directory,
> unless it cannot be found elsewhere.
>
Lua files are searched for before C modules (ie, iterates over
package.path before package.cpath)
PS though; adding ./?/init.lua to the default search path is probably useful.