1

I have a very short piece of lua code (example: os.date("%Z") ). I want to know if it is possible (currently or planned) to invoke that code directly on the same page, rather than creating a module with only one function, which job is to call that code.

I know creating a module with other time functions would be approach, but no wiki user will need to use others functions in the future. So creating I don't think it worth creating a library(module) of that kind.

Nemo
  • 2,441
  • 2
  • 29
  • 63
user2284570
  • 2,891
  • 3
  • 26
  • 74

1 Answers1

4

No, that's not possible, currently or planned. You must create a module with one function, and invoke it.

Note that this code snippet is an obviously reusable function, which one might call "getDefaultTimezone".

Brion
  • 1,031
  • 6
  • 4
  • Ok, but I have [small problems](https://fr.wikipedia.org/wiki/Module:Wrapper) at wrapping the example since os.date() as an optional second argument, but I recognize wraping function with optionals argument is an another question... – user2284570 Sep 30 '13 at 21:18