Module:Singleton test

local _,invoke = pcall(require, "module:singleton/invoke") local p = {}

local call_wrap = function invoke.call end p.nothing = function end

p.main = function(frame) return pcall(call_wrap) and frame.args[1] or frame.args[2] or '' end

p.meta_before = function(...) if pcall(call_wrap) then return ... end end

p.meta_after = function(...) if not pcall(call_wrap) then return ... end end return p