[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Request for ./?/init.lua in the default package.path
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 29 May 2009 13:12:08 +0100
On Fri, May 29, 2009 at 12:56 AM, David Manura <firstname.lastname@example.org> wrote:
> On Thu, May 28, 2009 at 2:42 PM, M Joonas Pihlaja wrote:
>> Can Lua 5.2 have ./?/init.lua in the default package.path?
> Or remove the init.lua thing entirely .
>  http://lua-users.org/lists/lua-l/2009-04/msg00389.html
I'd disagree with removing it as I like to be able to have a Lua
module that has itself and its submodules contained in one directory:
...which would be imported by require "mylib", require "mylib.sub1"
and require "mylib.sub2". Sure, I could have
...but to me that is a bit messier, it's better to have a single
"root" file/directory than for it to be all-too-easy to separate a
module from its submodules when copying libs around (especially when
the "lua" folder gets quite full).