Support for calling SVs, eval, array context, void context, get_sv.
[perl4caml.git] / test.pl
1 print "this is loading the 'test.pl' script!\n";
2
3 sub return_one
4   {
5     print "this is the 'return_one' function!\n";
6     1
7   }
8
9 sub return_array
10   {
11     print "this is the 'return_array' function!\n";
12     (1, 2, 3)
13   }
14
15 sub return_closure
16   {
17     sub { $_[0] * $_[1] }
18   }
19
20 sub dies
21   {
22     print "this is the 'dies' function! about to die now ...\n";
23     die "this is the exception message from 'dies'";
24   }
25
26 sub adder
27   {
28     $_[0] + $_[1]
29   }