(* Simple test of the API.
* Copyright (C) 2003 Merjis Ltd.
- * $Id: test.ml,v 1.2 2003-10-12 17:33:14 rich Exp $
+ * $Id: test.ml,v 1.3 2003-10-15 16:51:12 rich Exp $
*)
open Printf
+(* XXX Hack to workaround some sort of linking bug in OCaml. Without this
+ * the Perl module isn't initialized and this code crashes.
+ *)
+let f = Pl_Net_Google.may
+
let () =
(* Load "test.pl". *)
Perl.eval "require 'examples/test.pl'";
printf "TestClass.foo is %d\n" (Perl.int_of_sv sv); flush stdout;
(* Destroy the interpreter. *)
- Perl.destroy ()
+ Perl.destroy (Perl.current_interpreter ())