X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Fgoogle.ml;h=2e8ca4068b14db34cb9b7a18786771faebae2baf;hb=9e88eacb7d2a8883900fba0c8abedc26c7510d98;hp=47bd8e4341336b6f629000e4a547a8df99e815c0;hpb=918648a5563d9ae8e4079fdf7d364387b02b1b34;p=perl4caml.git diff --git a/examples/google.ml b/examples/google.ml index 47bd8e4..2e8ca40 100644 --- a/examples/google.ml +++ b/examples/google.ml @@ -1,7 +1,7 @@ (* Example program which uses Net::Google to query Google. * You will need to have a Google API key in ~/.googlekey for this to work. * Copyright (C) 2003 Merjis Ltd. - * $Id: google.ml,v 1.1 2003-10-14 16:05:21 rich Exp $ + * $Id: google.ml,v 1.2 2003-10-15 16:51:12 rich Exp $ *) open Printf @@ -9,9 +9,6 @@ open Printf open Pl_Net_Google let () = - (* This is a hack which shouldn't be needed in future. *) - Perl.eval "use Net::Google"; - (* Load Google API key. *) let home = Sys.getenv "HOME" in let chan = open_in (home ^ "/.googlekey") in @@ -32,3 +29,6 @@ let () = (fun response -> printf "* %s\n \n\n" response#title response#url ) search#results; + + (* Destroy the Perl interpreter. *) + Perl.destroy (Perl.current_interpreter ())