lua-users home
lua-l archive

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


> However, that's not the only problem. Now imagine that the "utils"
> package in turn depends on another package.
> When we call utils with require, it won't get an arg[0] or whatever
> other way to tell its own folder, so that it can load the other
> modules it depends on...
> 
> How do you solve similar problems?

My "Import" technical note (LTN 11) provides a possible solution:

http://www.lua.org/notes/ltn011.html

The path is provided as an argument to the PIF (see LTN for details.)

--
Wim