Springe nei ynhâld

Module:No globals

Ut Wikipedy

De dokumintaasje foar dizze module kin oanmakke wurde opModule:No globals/doc

localmt=getmetatable(_G)or{}
functionmt.__index(t,k)
ifk~='arg'then
-- perf optimization here and below: do not load Module:TNT unless there is an error
error(require('Module:TNT').format('I18n/No globals','err-read',tostring(k)),2)
end
returnnil
end
functionmt.__newindex(t,k,v)
ifk~='arg'then
error(require('Module:TNT').format('I18n/No globals','err-write',tostring(k)),2)
end
rawset(t,k,v)
end
setmetatable(_G,mt)