[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Wishlists and Modules (was [ANN] libmc)
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 3 Sep 2009 16:01:00 +0200
2009/9/3 John Hind <firstname.lastname@example.org>:
> But why bother putting it in the preload table if you then immediately load it
> using C code? The idea of the preload table is so you can have C libraries compiled into
> the runtime but which only get loaded into the Lua environment if called for by
> the script. If you load it right off, you should load it like any of the standard
> libraries i.e. by just executing its loader function.
Loaders of the standard libraries are designed to be just executed.
Modules that are designed to be loaded through require may rely on the
extra features of require to work properly (ie. setting
package.loaded[modname] to the return value of the loader).