[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Basic question about modules
- From: Matthew Wild <mwild1@...>
- Date: Tue, 5 Oct 2010 23:52:07 +0100
On 5 October 2010 22:06, Joe Andresen <firstname.lastname@example.org> wrote:
> So basically what everyone is saying is that there is no standard for
> writing modules in Lua 5.2 or 5.1 for that matter?
The "standard" is that a module should be a file that when run either
1) returns the module table or 2) pokes the module table into
package.loaded[modulename]. Either will cause the module table to be
returned by require().
Whichever of these you do and how you do it is up to you.