set of meta methods, most useful for lua-t
lirary
- support
require
module name with dots:_ = require "t/seo/google.com"
- recursive autoloader (default loader without
init.lua
created, nice for hier) - match and iterate loaded submodules: ex.
t.seo["google.com"]
,for k,v in pairs(t.seo)
, to iter all available need preload - module path normalizing (
t.net.ip
->t/net/ip
), require() works using any format searcher
injected as #1 module searcher (topackage.searchers
)- instance/type meta methods manipulations
loader
: recursive auto loader containing loaded/preloaded modules, lazy by defaultmodule
: module meta methods combinedcomputed
/computable
: like js computed object, effective for fast defining of small but complex data structuresmt
/mtindex
: get/set metatables helperscache
: proxy cache to keep mt cache consistentchain
: complex objectclone
: mt cloningmethods
: recursive mt copyingmemoize
: regular memoizeno
: helper library with most of implementation specific functions including loader
- all loaders have same type (mt) and use cache to keep its module name + other params
- the reason is to keep only actual (loaded) submodules in loader object itself (and all available if case of preload)
- users may rely on
pairs(loader(...))
working in all lua versions - iterating loader skips
init.lua
due tonet/init.lua
loads asrequire "net"
, which differ nesting level fromrequire "net/ip"
loadingnet/ip.lua
- use chaining to add module functions to loader as metamethods (
__call
/__tostring
/ etc), to make some useful static object
luarocks install --server=https://luarocks.org/dev meta
lua5.1
paths
compat53
busted