File: 030-call-method.ml

package info (click to toggle)
perl4caml 0.9.5-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 512 kB
  • ctags: 788
  • sloc: ml: 1,572; ansic: 957; makefile: 186; perl: 45
file content (13 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
(* Basic constructor and method calls.
 * $Id: 030-call-method.ml,v 1.1 2005/01/28 23:09:33 rich Exp $
 *)

open Perl

let () =
  ignore (eval "use IO::File");
  let io = call_class_method "IO::File" "new_tmpfile" [] in
  call_method_void io "print" [ sv_of_string "hello, world" ];
  call_method_void io "close" [];;

Gc.full_major ()