Create the following as Module:Foo:
local p, mt = {}, {} function mt.__call(t, frame) return 'Hello from the __call metamethod' end p.main = setmetatable({}, mt) return p
From the sandbox, =p.main(mw.getCurrentFrame()) correctly displays "Hello from the __call metamethod". From wikitext, however, {{#invoke:Foo|main}} displays a script error that p.main isn't a function.
Version: unspecified
Severity: trivial