lua-users home
lua-l archive

Re: Re-requiring modules

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


On 2013-Oct-22 (Tue) at 17:37 (+0200), Robert Virding wrote:
>> Is it possible to re-require a module? The documentation implies
>> that it is not possible as if the module has been loaded then it
>> will be remembered in the package.loaded table and the next time
>> is it loaded then this value will be reused.
Robert,
 From the Good Book (PiL3, p 153):
 "To force require into loading the same module twice, we simply
 erase the library entry from package.loaded:
 package.loaded.<modname> = nil
 The next time the module is required, require will do
 all its work again."
Joseph
------------------------------------------------------------------------
Joseph Manning / Computer Science / UCC Cork Ireland / manning@cs.ucc.ie
------------------------------------------------------------------------

AltStyle によって変換されたページ (->オリジナル) /