What is "loadall.so"?
Asked Answered
S

1

6

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.

Sapwood answered 3/12, 2016 at 22:12 Comment(0)
S
2

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.

Seeto answered 1/1, 2017 at 9:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.