I think there might possibly be a design problem in the frame
object. The problem is that currently a Lua module can launch an infinity of templates, an infinity of parsers functions, but only 100 other modules. I explain the situation at :en:Wikipedia talk:Lua § Editing the args
metatable of a child frame:
Module:Params offers the possibility to map or rename parameters using either helper templates or modules or parser functions. Currently, in the case of
mapping_by_invoking
andrenaming_by_invoking
, while iterating, a new child frame gets created for each parameter (#1, #2). This means that if the parameters to map or rename are more than about a hundred the code breaks, because, as the Scribunto-Lua manual says, “The number of frames that may be created at any one time is limited”.I have tried to solve the problem in Module:Params/sandbox, but all my attempts at keeping only one child frame throughout the loop failed (#3, #4, #5, #6). The reason is that once the child frame object gets created I can no longer edit its
.args
metatable. Yet, I would need to do that, because each module invocation needs to receive different parameters.Testcases are available at Module:Params/testcases/tmaps and Params/testcases/tmaps sandbox. Any idea on how to solve the problem and being able to map more than 100 parameters using a module?
Is any workaround possible?