lua-users home
lua-l archive

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


2014-04-14 17:29 GMT+02:00 Coroutines <coroutines@gmail.com>:

> If a module returns false or nil, I believe it will be loaded from the
> file on every require().

Not quite. The go/nogo test is whether there is an entry for the module
in package.loaded.

$ lua
Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> package.loaded.lpeg = "bazinga"
> lpeg = require"lpeg"
> =lpeg
bazinga