![]() | This is an archive of past discussions about Module:BaseConvert. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
I have used the code as documented (2 lines, see below). It looks like that, by adding require('Module:No globals')
, an error is triggered.
Reproduce: see Module:User:DePiep/BCdemo:
Something I can do? I want to use the Module:No globals in top (not in functions), i.e. for the whole module. @GKFX and Toohool: DePiep (talk) 18:27, 11 April 2022 (UTC)
local
(so local function ...
. User:GKFXtalk 19:14, 11 April 2022 (UTC)
Got it. In Module:BaseConvert/sandbox, I have made local
three functions: diff. To consider: should _convert()
be public i.e., be p._convert()
(not local
)? Depends on the frame/args handling in p.convert()
if I'm right.
Anyway, how to arrive at an edit proposal? -DePiep (talk) 19:46, 11 April 2022 (UTC)
I propose to change all code in Module:BaseConvert with code from Module:BaseConvert/sandbox (diff).
The issue: when Module:No globals is used per documentation, Module:BaseConvert throws an error for r/w a global variable (like "Tried to write global normalizeFullWidthChars"). This is solved by declaring all internal functions explicitly local
. There are three, see the diff; the sandbox was tested with 'No globals' too.
If no (tech) issues or questions arise, I'll make this a formal Edit Request. (32k transclusions). -DePiep (talk) 20:18, 11 April 2022 (UTC)