Module:No globals/doc

De La documentation de La Raffinerie
Aller à :navigation, rechercher

Ceci est la page de documentation pour Module:No globals

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||{{#switch:Erreur Lua : First parameter must be one of edit, move, create, upload, undelete, autoreview.|sysop|templateeditor|interfaceadmin=|#default=}}}}

{{#ifeq:doc|doc|{{#if:|Modèle:Pp}}|{{#switch:

 {{#if:
 |     
 | {{#ifeq:Module|Module
   | module
   | other
   }}
 }}

| module = <templatestyles src="Module:Message box/ombox.css"></templatestyles>

| other | #default = Modèle:Error }}}}

This module causes an error if any nil global is read or if any global is written to, with the exception of arg. To use, add <syntaxhighlight lang="lua" inline>require('Module:No globals')</syntaxhighlight> to the top of the module using it. The arg variable is excluded because it is necessary for Scribunto's require function to work properly. (See the Scribunto source code here.)

See also