Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "loadall.so"?

Tags:

lua

luajit

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.

like image 593
timbo Avatar asked Dec 03 '16 22:12

timbo


1 Answers

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.

like image 168
Marc Balmer Avatar answered Sep 23 '22 19:09

Marc Balmer