lua-users home
lua-l archive

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

> -----Original Message-----
> From: [] 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