Skip to main content

msys.dumper.Dumper

Last updated March 2020

Name

msys.dumper.Dumper — Dump information about an object

Synopsis

msys.dumper.Dumper(res);

res: mixed

Description

Dump information about an object. This function is typically used for debugging purposes.

Enable this function with the statement require('msys.dumper').

require("msys.core");
require("msys.pcre");
require("msys.dumper");
local mod = {};

function mod:validate_connect(accept, vctx)
  local res, err = msys.dnsLookup('messagesystems.com', 'A');
  if res then
    if type(res[1]) == "string" then
      table.sort(res);
    end
    local i;
    local l = msys.pcre.split(msys.dumper.Dumper(res), "\\n");
    for i=1, #l do
      print("OK:", l[i]);
    end
  else
    print("ERROR:", msys.dumper.Dumper(err));
  end
  return msys.core.VALIDATE_CONT;
end

msys.registerModule("dns-test", mod);
Was this page helpful?