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