X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Ftest.ml;h=99bcfd4538bcc7639dc9c8c8f7c10f677648a1b4;hb=9e88eacb7d2a8883900fba0c8abedc26c7510d98;hp=8ec8c74ea4b0cfc7e968abd5e9fc1b87dc95a434;hpb=918648a5563d9ae8e4079fdf7d364387b02b1b34;p=perl4caml.git diff --git a/examples/test.ml b/examples/test.ml index 8ec8c74..99bcfd4 100644 --- a/examples/test.ml +++ b/examples/test.ml @@ -1,10 +1,15 @@ (* 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'"; @@ -46,4 +51,4 @@ let () = printf "TestClass.foo is %d\n" (Perl.int_of_sv sv); flush stdout; (* Destroy the interpreter. *) - Perl.destroy () + Perl.destroy (Perl.current_interpreter ())