[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Can I get two instances of the same module?
- From: Thijs Schreijer <thijs@...>
- Date: Thu, 6 Mar 2014 15:24:26 +0000
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of Journeyer J. Joh
> Sent: donderdag 6 maart 2014 11:21
> To: Lua mailing list
> Subject: Re: Can I get two instances of the same module?
> Hi Thijs Schreijer,
> Your method works!!
I know! :)
> I knew that the module() placed the global variable and this variable was
> the reason of my problem as you also know.
> I was going to remove module(), but your method is simpler!
Well... if your using some external module (not your own code), then feel free to use this method. But if you write your own modules, I would strongly advise you to drop the 'module()' function, it's the accepted idiom these days, and makes sure any code is forward compatible to 5.2