Exporting tables directly

Fragment of a discussion from User talk:Kephir
Jump to navigation Jump to search

Actually, they can:

export.whatever = nil

setmetatable(export, {
	__index = function (self, key)
		if key == 'whatever' then
			require('Module:debug').track('whatever')
			return whatever
		end
	end
})

But I agree, annotating these is a good idea.

Keφr18:48, 16 May 2014

That code snippet would be very useful to preserve on Category:Template tracking!

CodeCat18:50, 16 May 2014