[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Can I get two instances of the same module?
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 6 Mar 2014 09:14:37 +0200
On Thu, Mar 6, 2014 at 8:58 AM, Journeyer J. Joh
<oosaprogrammer@gmail.com> > There is no way to make two instances of
a module.
>
> Am I right?
Completely right. By design, modules are loaded exactly once, and cached.
What do you want to do?
You can create a module which returns a function (doesn't always have
to be a table!) which you call to create a new specialized 'instance'.
(classes are a subset of this idea)
steve d.