[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Non-uniqueness of module names
- From: Sean Conner <sean@...>
- Date: Fri, 12 Apr 2019 15:37:44 -0400
It was thus said that the Great Abhijit Nandy once stated:
> So why aren't the paths from where the modules are loaded, simply kept in a
> table mapped to the module name?
Because not all Lua modules have a path. Aside from the builtin modules
like io or table, it is possible to modify the module system to load modules
not on the filesystem. At work, I have a custom Lua interpreter that embeds
all the Lua modules we need into a single Lua executable. This includes
modules written in C and Lua . There is no path for these modules.
Then I played around with an idea to load Lua modules directly from a zip
file . What's the path for these? That of the zip file? It doesn't
 It kind of worked, in that I could load and run Lua modules written
in Lua directly from the zip file, but not those written in C.