lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 1 February 2018 at 23:22, Sean Conner <sean@conman.org> wrote:

>> Maybe there is one problem - the require function also loads shared
>> libraries. Having these in multiple locations could be a problem as
>> these need to be in the path.
>
>   It depends upon what you mean.  For example, my syslog module [1] is a
> C-based module.  When you do:
>
>         local syslog = require "org.conman.syslog"
>
> Lua will replace the dots with the file separator (in my case '/'):
>
>         org/conman/syslog
>

Fine, but I meant that shared libraries must be on the system path for
them to resolve each other hen you have one library depending on
another. So putting them in various subfolders is not going to work
unless you also set PATH or LD_LIBRARY_PATH. Maybe the solution is
that the name by which a module is known should be distinct from the
path from where it is loaded - or at least user should be able to set
the desired name,

Regards