lua-users home
lua-l archive

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


Hi Thijs Schreijer,

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

O.K.
Thank you for good tips!
Journeyer


----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------


2014-03-07 0:24 GMT+09:00 Thijs Schreijer <thijs@thijsschreijer.nl>:
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.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

Thijs