X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=wrappers%2Fpl_WWW_Mechanize.ml;h=a0b5f60afbbbf9038de35ccc10fcd5aa521c7dec;hb=1e204b159732a1162086091c0cf1ffb675c68217;hp=2582b9da8aed522e47455e2f0267d22a8a420429;hpb=99c7f999369e304db0a4a93b7406dd037b52ed94;p=perl4caml.git diff --git a/wrappers/pl_WWW_Mechanize.ml b/wrappers/pl_WWW_Mechanize.ml index 2582b9d..a0b5f60 100644 --- a/wrappers/pl_WWW_Mechanize.ml +++ b/wrappers/pl_WWW_Mechanize.ml @@ -2,7 +2,7 @@ * * Copyright (C) 2004 Merjis Ltd. * - * $Id: pl_WWW_Mechanize.ml,v 1.2 2004-11-26 13:33:10 rich Exp $ + * $Id: pl_WWW_Mechanize.ml,v 1.3 2005-01-13 16:06:04 rich Exp $ *) open Perl @@ -187,6 +187,10 @@ end (* XXX Should be able to pass args to constructor of LWP::UserAgent. *) (* XXX WWW::Mechanize has additional parameters. *) -let new_ () = - let sv = call_class_method "WWW::Mechanize" "new" [] in +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