[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can I get two instances of the same module?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 6 Mar 2014 09:44:56 +0200
2014-03-06 9:39 GMT+02:00 Journeyer J. Joh <oosaprogrammer@gmail.com>:
> I tried this way now,
>
>> local aaa = require "account"
>> package.loaded["account"] = nil
>> local bbb = require "account"
>> print(aaa)
>> print(bbb)
>
>
> The result is
>
>> table: 0x1296990
>> table: 0x1296990
>
On the other hand, I get this:
$ lua
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
> xxx=require"ml"
> package.loaded.ml=nil
> yyy=require"ml"
> print(xxx)
table: 0x8f24678
> print(yyy)
table: 0x8f2dd10
> xxx.split=nil
> print(xxx.split,yyy.split)
nil function: 0x8f2c6d0