--원본 테이블
t = {}
--원본 테이블 보관
local _t = t 
--프록시 생성
t = {}
--메타테이블 생성
local mt = {
	__index = function (t,k)
		print("*access to element " .. tostring(k) )
		return _t[k]
	end,
	
	__newindex = function (t, k, v)
		print("*update of element " .. tostring(k) ..
			" to " .. tostring(v))
		_t[k] = v
	end
}
setmetatable(t,mt)
--테이블 구성값 변경
t[2] = "hello"
print(t[2])
---------------------------------
--출력값
> t[2] = "hello"
*update of element 2 to hello
> print(t[2])
*access element to 2
hello
                     
                    
                                    
                                        
                                        추천 : 
2