What is the "loadall.so"?

Looking at the default Lua path 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 loadall.so ? This does not exist anywhere on my Linux system.

+5
source share
1 answer

Cpath shows you where Lua will look for modules when you β€œrequire” a module. It will try to separate semicolons, replacing "?" with the name of the module. loadall.so is the last place, the last place. If he is present (NB: he does not need to introduce him), then Lua will download it and see if he finds the module code in it.

+2
source

Source: https://habr.com/ru/post/1260770/


All Articles