File: test.pl

package info (click to toggle)
perl4caml 0.9.5-8
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 540 kB
  • sloc: ml: 1,572; ansic: 957; makefile: 186; perl: 45
file content (32 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use lib "examples";
use TestClass;

print "this is loading the 'test.pl' script!\n";

sub return_one
  {
    print "this is the 'return_one' function!\n";
    1
  }

sub return_array
  {
    print "this is the 'return_array' function!\n";
    (1, 2, 3)
  }

sub return_closure
  {
    sub { $_[0] * $_[1] }
  }

sub dies
  {
    print "this is the 'dies' function! about to die now ...\n";
    die "this is the exception message from 'dies'";
  }

sub adder
  {
    $_[0] + $_[1]
  }