[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] mergelua
- From: Petite Abeille <petite.abeille@...>
- Date: Sun, 16 Oct 2011 21:10:36 +0200
On Oct 16, 2011, at 9:02 PM, Dirk Laurie wrote:
> return mymod1, mymod2
> What's wrong with that?
If it works for you, nothing wrong. To each their own.
Otherwise, 2 main things:
(1) Return at the end. This presumes one module per Lua chunk. You cannot seamlessly bundle your code.
( (1.1) Parenthetically: the second module will be ignored in your return statement. )
(2) Access to global environment. Your module is not self-contained and may access and set anything in _G. This might or might not be a bug, depending how you look at it.