Looking at the default Lua cpath with luajit:
luajit -e "print(package.cpath)"
I get:
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
What is the purpose of the loadall.so
? It doesn't actually exist anywhere on my Linux system.
The cpath shows you where Lua will look for modules when you "require" a module. It will try the semicolon separated places, replacing "?" with the name of the module being required. loadall.so is a catch-all place, kind of a last resort. If it is present (NB: there is no need for it to present), then Lua will load it and look if it finds the module code in it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With