From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA21430; Thu, 25 Mar 2004 14:55:20 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA21238 for ; Thu, 25 Mar 2004 14:55:19 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i2PDtrKW018879 for ; Thu, 25 Mar 2004 14:55:55 +0100 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1B6VKE-0006no-00 for ; Thu, 25 Mar 2004 13:55:14 +0000 Date: Thu, 25 Mar 2004 13:55:14 +0000 To: caml-list@inria.fr Subject: [Caml-list] perl4caml 0.3.10 Message-ID: <20040325135514.GA26055@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; toolkit:01 cleanups:01 cpan:01 low-level:01 printf:01 high-level:01 wrappers:01 cpan:01 lwp:01 useragent:99 useragent:99 lwp:01 failwith:01 type-safe:01 ltd:98 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 360 I'm please to announce Perl4Caml 0.3.10, available here: http://www.merjis.com/developers/perl4caml/ This version includes a wrapper around the Template Toolkit, contributed by Dave Benjamin, and some cleanups for memory handling (although memory handling still isn't quite right, and for this reason the library doesn't free Perl objects - any help getting this right is welcomed). [From the website ...] perl4caml allows you to use Perl code within Objective CAML (OCaml), thus neatly side-stepping the old problem with OCaml which was that it lacked a comprehensive set of libraries. Well now you can use any part of CPAN in your OCaml code. perl4caml has both a low-level interface to Perl, eg: Perl.eval "$a = 3"; printf "$a contains %d\n" (Perl.int_of_sv (Perl.get_sv "a")); and it contains high-level wrappers around some CPAN libraries (more to come later), eg: open Pl_LWP_UserAgent open Pl_HTTP_Request (* Create the UserAgent object. *) let ua = Pl_LWP_UserAgent.new_ ~env_proxy:true () in (* Fetch the page. *) let req = Pl_HTTP_Request.new_ "GET" ~uri:site () in let res = ua#request req in if not res#is_success then failwith ("Error while fetching " ^ site ^ ": " ^ res#status_line); -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment Perl4Caml lets you use any Perl library in your type-safe Objective CAML programs. http://www.merjis.com/developers/perl4caml/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners