lua-users home
lua-l archive

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

On Thu, Mar 10, 2011 at 11:37, Benoit Germain <> wrote:
> Am I definitively stuck to a compile-time defined fixed number of keeper
> states, or is there some way I haven't seen to do what I want? An option
> would be for Lua 5.2 to support the propagation such additional parameters
> :-).

A common idiom to this problem is to have an "install" public method
that initializes the module as desired:

require 'lanes'.install( 5 )

You don't immediately solve the problem of module initialization,
because install will be called pos-init, but maybe you can refactor
your code to do so.