lua-users home
lua-l archive

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


On 11.01.2011 10:11, beo wulf wrote:
> This is admittedly off topic:
> 
>   I have a large scale lua project, located in ~/lua/
> 
> Now, I have:
> 
> ~/lua/foo.lua
> 
> foo.lua also depends on sub_modules,
[...]
> ~/lua/foo.lua
> ~/lua/_foo/cat.lua
> ~/lua/_foo/dog.lua
> ~/lua/_foo/horse.lua
> 
> Question is: is there a better convention to organize this (that also
> doesn't screw up auto compeltion?)

~/lua/foo/init.lua

But you would need to add:
package.path=package.path..'~/lua/?.lua'
(expanding ~ manually I guess)
You can already have some software installed this way, luadoc for
example - look for /usr/share/lua/5.1/*/*.init

Regards,
miko