let new_ ?autocheck () =
let args = ref [] in
let may f = function None -> () | Some v -> f v in
may (fun v ->
args := sv_of_string "autocheck" :: sv_of_bool v :: !args) autocheck;
let sv = call_class_method "WWW::Mechanize" "new" !args in
new www_mechanize sv