view src/luan/modules/Package.luan @ 1735:4b56eff90040 default tip

add hosting.html
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 02 Oct 2022 17:32:00 -0600
parents c922446f53aa
children
line wrap: on
line source

require "java"
local PackageLuan = require "java:luan.modules.PackageLuan"
local BasicLuan = require "java:luan.modules.BasicLuan"
local set_metatable = BasicLuan.set_metatable

local Package = {}

Package.load = PackageLuan.load

local loaded = PackageLuan.loaded  -- returns java map
local mt = {}
function mt.__index(_,key)
	return loaded().get(key)
end
function mt.__new_index(_,key,value)
	loaded().put(key,value)
end
Package.loaded = {}
set_metatable(Package.loaded,mt)

return Package