lua-users home
lua-l archive

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


On Mon, Aug 2, 2010 at 4:58 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> On Mon, Aug 2, 2010 at 10:33 AM, Stuart P. Bentley
> <stuart@testtrack4.com> wrote:
>> This is why I propose module(...) remain as a helper function which creates
>> and returns the appropriate table in package.loaded as it does now
>
> isn't require() the one that writes the module in package.loaded?
>
> --
> Javier
>

It's a bit more complicated than one or the other - require() will not
overwrite a value set into package.loaded[...] if the loader function
sets it directly, and module(...) does just that.

-Duncan