X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Floadpage.ml;h=6f8db96072efc63a8096c692b3fb8c2c71c210db;hb=7f82a6f31e40e596a43939ab18d685a8f0b78d7b;hp=d73bf9cbfc1c3d3eb1ecd1b2a1e31acece14c1e8;hpb=1c369c3ba6b71d4524dfacd0ba3554e8a524ed57;p=perl4caml.git diff --git a/examples/loadpage.ml b/examples/loadpage.ml index d73bf9c..6f8db96 100644 --- a/examples/loadpage.ml +++ b/examples/loadpage.ml @@ -1,7 +1,7 @@ (* Example program which uses LWP::UserAgent and HTML::TreeBuilder to * download an HTTP page and parse it. * Copyright (C) 2003 Merjis Ltd. - * $Id: loadpage.ml,v 1.1 2003-10-12 17:33:14 rich Exp $ + * $Id: loadpage.ml,v 1.5 2003-12-11 17:41:52 rich Exp $ *) open Printf @@ -12,10 +12,6 @@ open Pl_HTML_TreeBuilder open Pl_HTML_Element let () = - (* This is a hack which shouldn't be needed in future. *) - Perl.eval "use LWP::UserAgent"; - Perl.eval "use Net::HTTP"; - let site = if Array.length Sys.argv >= 2 then Sys.argv.(1) @@ -60,5 +56,5 @@ let () = in print tree; - (* Destroy the Perl interpreter. *) - Perl.destroy () + (* Perform a full collection - good way to find GC/allocation bugs. *) + Gc.full_major ()