let mode =
try
let str = Sys.getenv "CAMLP4_DEBUG" in
let rec loop acc i =
try
let pos = String.index_from str i ':'
in
loop (StringSet.add (String.sub str i (pos - i)) acc) (pos + 1)
with
| Not_found ->
StringSet.add (String.sub str i ((String.length str) - i)) acc in
let sections = loop StringSet.empty 0
in
if StringSet.mem "*" sections
then (fun _ -> true)
else (fun x -> StringSet.mem x sections)
with | Not_found -> (fun _ -> false)