lua-users home
lua-l archive

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


On Thu, 10 Mar 2011, Benoit Germain wrote:
>
> Unfortunately, additional parameters passed to require() are lost and the
> module initialisation function doesn't get them.

The reason for this is that require() can be called any number of times
for the same module and when it is called the second and subsequent times
it just returns the exising instance of the module.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Trafalgar: Easterly or northeasterly 5 to 7, decreasing 4 at times,
occasionally gale 8 in southeast. Moderate or rough. Thundery showers. Good,
occasionally poor.