Table of package loaders
This is a table of the loaders that Lua calls when handling the "require" function. As defined in the source code they are presently done in this order:
You could conceivable alter the behaviour of the "require" function be re-odering the loaders (eg. load DLLs before Lua code), deleting a loader, or adding your own.
The existing loaders appear to push a string describing what files they failed to load (which you can see if you load a non-existant package), so any loaders you write yourself could return the loaded function on success, and an error string on failure.
See Also ...
package.config - Package configuration string
Lua base functions
(Help topic: lua=package.loaders)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )