caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] perl4caml 0.3.10
@ 2004-03-25 13:55 Richard Jones
  0 siblings, 0 replies; only message in thread
From: Richard Jones @ 2004-03-25 13:55 UTC (permalink / raw)
  To: caml-list


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-25 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-25 13:55 [Caml-list] perl4caml 0.3.10 Richard Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).