lua-users home
lua-l archive

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


>   A question:  Two modules use Penlight, foo and bar.  If I include foo
> and
> bar into a project, does that mean I have two instances of Penlight
> loaded?

require stores "modules" that have already been required in package.loaded[modname] so that if you load the same module twice, it loads it only once:
http://www.lua.org/manual/5.1/manual.html#pdf-require