(* Interface to Perl from OCaml. * Copyright (C) 2003 Merjis Ltd. * $Id: perl.ml,v 1.1 2003-10-11 18:25:52 rich Exp $ *) type t type sv exception PerlFailure of string (* Perform some once-only initialization when the library is loaded. *) external init : unit -> unit = "perl4caml_init" let () = init () external create : ?args:string array -> unit -> t = "perl4caml_create" external destroy : t -> unit = "perl4caml_destroy" external set_context : t -> unit = "perl4caml_set_context" external int_of_sv : sv -> int = "perl4caml_int_of_sv" external sv_of_int : int -> sv = "perl4caml_sv_of_int" external float_of_sv : sv -> int = "perl4caml_float_of_sv" external sv_of_float : int -> sv = "perl4caml_sv_of_float" external string_of_sv : sv -> string = "perl4caml_string_of_sv" external sv_of_string : string -> sv = "perl4caml_sv_of_string" external call_scalar : string -> sv list -> sv = "perl4caml_call_scalar" (* external call_array : string -> sv list -> sv list = "perl4caml_call_array" external call : string -> sv list -> unit = "perl4caml_call" external eval : string -> sv = "perl4caml_eval" *)