Aller au contenu

Module:Episode

De Stargate Wiki Sémantique
Documentation icon Documentation module[créer]
------------------------------------------------------------
-- DIAGNOSTIC ULTIME : ne peut pas planter
------------------------------------------------------------

local function dump_table(t)
    if type(t) ~= "table" then
        return tostring(t)
    end
    local out = {}
    for k,v in pairs(t) do
        table.insert(out, tostring(k) .. "=" .. tostring(v))
    end
    return "{ " .. table.concat(out, ", ") .. " }"
end

local name = "Module:Episode/MultiSeries"

local before = package.loaded[name]

local ok, result = pcall(require, name)

local after = package.loaded[name]

return table.concat({
    "=== DIAGNOSTIC ULTIME ===",
    "",
    "Nom require() = >" .. name .. "<",
    "",
    "--- AVANT require() ---",
    tostring(before),
    "",
    "--- RESULTAT require() ---",
    "pcall ok = " .. tostring(ok),
    "result = " .. tostring(result),
    "type(result) = " .. type(result),
    "",
    "--- APRES require() ---",
    tostring(after),
    "",
    "--- package.loaded[name] ---",
    tostring(package.loaded[name]),
    "",
    "--- package.loaded (extrait Episode/*) ---",
}, "\n")