Jump to content

Module:Sandbox/Ahecht

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ahecht (talk | contribs) at 13:43, 20 June 2018 (test IP). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

local IP = require('Module:IP')
local IPAddress = IP.IPAddress

function p.main(frame)
	local output = ''
	output = output .. 'frame: ' .. type(frame) .. ' '
	if frame[1] then output = output .. frame[1] end
	output = output .. '\<br />frame.args: ' .. type(frame.args) .. ' '
	if frame.args[1] then output = output .. frame.args[1] end
	output = output .. '<br />frame:getParent().args ' .. type(frame:getParent().args) .. ' '
	if frame:getParent().args[1] then output = output .. frame:getParent().args[1] end
	output = pcall(function () return IPAddress.new('1.2.3.444') end)
	return output
end

return p