Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ANNOUNCE: mod_caml 0.8.0 - Objective CAML bindings for the Apache API
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-09-27 (17:29)
From: Richard Jones <rich@a...>
Subject: [Caml-list] ANNOUNCE: mod_caml 0.8.0 - Objective CAML bindings for the Apache API
I'm pleased to announce that mod_caml 0.8.0 is available here:

mod_caml is a set of Objective CAML (OCaml) bindings for the Apache
API. It allows you to run CGI scripts written in OCaml directly inside
the Apache webserver. However, it is much much more than just that:

    * Bind to any part of the Apache request cycle.
    * Read and modify internal Apache structures.
    * Share modules of code between handlers and scripts.
    * CGI library and templating system (allows separation of code and
    * Works with Apache 1.3 and Apache 2.0.


This is an interim release for testing. The main change is that some
API functions which previously returned 'string option' ('None'
meaning that the C string was NULL) have been changed to return just
'string', and to raise 'Not_found' if the C string is NULL. Returning
'string option' vs. throwing an exception makes little difference in
the case where you want to catch the NULL and do something
intelligent. But throwing an exception makes a lot more sense in the
common case where you simply don't expect a string to be NULL (eg. if
reading request_rec->uri which should never be NULL). In the common
case the code is shorter, and if the exception happens it causes a
fatal error (500) and propagates into the error log.

While this API change is large, ocamlc will find all the type mismatches
for you, and then it is a simple matter to change uses.

Another smaller API change is that templates now use assoc-lists
instead of Hashtbl for tables. This considerably simplifies CGI code
which uses tables.

I hope that this will be the last time the API has to change in such a
major way.


PS. I'm looking for more people who want to be an active part of this
project. So far we have 2 people with CVS 'commit' rights.

Richard Jones.
Merjis Ltd. - all your business data are belong to you.
PTHRLIB is a library for writing small, efficient and fast servers in C.
HTTP, CGI, DBI, lightweight threads:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: