<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hant-HK">
	<id>https://www.unitedbook.org/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3ANo_globals</id>
	<title>模組:No globals - 修訂歷史</title>
	<link rel="self" type="application/atom+xml" href="https://www.unitedbook.org/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3ANo_globals"/>
	<link rel="alternate" type="text/html" href="https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;action=history"/>
	<updated>2026-07-19T14:30:58Z</updated>
	<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;diff=2634&amp;oldid=prev</id>
		<title>imported&gt;DC：​建立內容為「local mt = getmetatable(_G) or {} function mt.__index (t, k) 	if k ~= &#039;arg&#039; then 		error(&#039;尝试读取空全局变量：&#039; .. tostring(k), 2) 	end 	return nil end…」的新頁面</title>
		<link rel="alternate" type="text/html" href="https://www.unitedbook.org/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;diff=2634&amp;oldid=prev"/>
		<updated>2021-06-17T15:25:00Z</updated>

		<summary type="html">&lt;p&gt;建立內容為「local mt = getmetatable(_G) or {} function mt.__index (t, k) 	if k ~= &amp;#039;arg&amp;#039; then 		error(&amp;#039;尝试读取空全局变量：&amp;#039; .. tostring(k), 2) 	end 	return nil end…」的新頁面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mt = getmetatable(_G) or {}&lt;br /&gt;
function mt.__index (t, k)&lt;br /&gt;
	if k ~= &amp;#039;arg&amp;#039; then&lt;br /&gt;
		error(&amp;#039;尝试读取空全局变量：&amp;#039; .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
function mt.__newindex(t, k, v)&lt;br /&gt;
	if k ~= &amp;#039;arg&amp;#039; then&lt;br /&gt;
		error(&amp;#039;尝试写入全局变量：&amp;#039; .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	rawset(t, k, v)&lt;br /&gt;
end&lt;br /&gt;
setmetatable(_G, mt)&lt;/div&gt;</summary>
		<author><name>imported&gt;DC</name></author>
	</entry>
</feed>