string dump(mixed foo) { if(stringp(foo)) return "\""+foo+"\""; if(arrayp(foo)) { string f, res = "({ /* "+sizeof(foo)+ "*/\n"; foreach(indices(foo), f) res += f + ": " + replace(dump(foo[f]), "\n", "\n ") + "\n"; return res + "\n})\n"; } if(mappingp(foo)) return "([ /* "+sizeof(foo)+ " */ ])"; if(listp(foo)) return "(< /* "+ sizeof(foo) + " >)"; if(intp(foo)) return (string)foo; if(functionp(foo)) return ""; if(objectp(foo)) { mixed f; string res = "OBJECT(\n"; foreach(indices(foo), f) if(!functionp(foo[f])) res += f + " -> " + replace(dump(foo[f]), "\n", "\n ") + "\n"; return res + ")\n"; } return "UNKNOWN"; } void parse(object id) { return "
" + dump(id->conf->pri) + ""; }