[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: require, module, globals and "magic"
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 16 Aug 2010 12:16:29 +0200
On Mon, Aug 16, 2010 at 10:45 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> A person can always write modules-without-magic:
>
> local M = {}
> function M.export() .. .end
> return M
>
> but the current require() function still creates the global
To correct myself; the global is NOT created in this way. Rather,
it's module() that does the dirty.
- References:
- require, module, globals and "magic", Nevin Flanagan
- Re: require, module, globals and "magic", steve donovan
- Re: require, module, globals and "magic", Lorenzo Donati
- Re: require, module, globals and "magic", steve donovan