lua-users home
lua-l archive

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



On Mar 04, 2005, at 19:09, Luiz Henrique de Figueiredo wrote:

Did something change in how require() is handled?

I'm not sure. It works for me...

(There is that problem that my libraries XXX have .so called lXXX.so...
but require is loading xxx.lua, which is fine.)

All your libraries work fine for me under work4.


The symptom is that the require function seems to work fine, but... a
call to any of the module loaded results in the following exception:

require( "random" )

Try assert(require"random") instead.

Hmmm... same difference... require() doesn't raise any exception, but doesn't seem to load and/or register the module either...

assert( require( "random" ) )

local aRandom = random.new( os.time() )

lua: Example.lua:206: attempt to index global `random' (a nil value)
stack traceback:
        Example.lua:206: in main chunk
        [C]: ?


Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/