Template:Lua example

--Load loader function local loadLib = require('Module:LoadLib')

--Load Modules loadLib(_G, {   --Place any other modules to load here })

--Begin Exports local p = {}

--Place local functions here...

--- -- Template: -- -- --- function p.main(frame) local args = getArgs(frame) local val = args[1]

-- Do stuff here... return string.pcall(p._main, val) end

--- -- Template: Module access point

function p._main(val) checkType('_main', 1, val, 'string')

local ret -- Do stuff here for p.main...

return ret end

--Finish Module/Exports return p