[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re:How to register lpeg.so to Lua ?
- From: leeya <leeyacn@...>
- Date: Fri, 5 Mar 2010 19:30:29 +0800 (CST)
Thank your very much! It should be what you pointed out. So this issue should close now.
Regarding LUA_CPATH issue, have any comments?
在2010-03-05 19:23:22，"Duncan Cross" <firstname.lastname@example.org> 写道：
>2010/3/5 leeya <email@example.com>:
>> But, when I tried to test test.lua scripts coming from lpeg-0.9, I got
>> trouble below:
>>> local m = require"lpeg"
>>> any = m.P(1)
>> stdin:1: attempt to index global 'm' (a nil value)
>> stack traceback:
>> stdin:1: in main chunk
>> [C]: ?
>The problem here is that if you define a local variable at the
>command-line prompt, it only exists for that line. Try taking out the
>word 'local' from the require statement, so it is just:
>>m = require "lpeg"
>...and it should work.