Debian Codegraph @

test/html/object.htm

raw
1 <html>
2 <head>
3 <title>Some tests for Embperl</title>
4 </head>
5
6
7 <body>
8
9 [-
10
11 package test::object ;
12
13 sub id
14 {
15 my $self = shift ;
16
17 return "id $self->{n}" ;
18 }
19
20 sub name
21 {
22 my $self = shift ;
23
24 return "name $self->{n}" ;
25 }
26
27 sub new
28 {
29 my $class = shift ;
30 my $n = shift ;
31 my $self = {n=>$n} ;
32 bless $self, $class ;
33 return $self ;
34 }
35
36 -]
37
38
39 [-
40 test::object->new (0) ;
41 -]
42
43 [-
44 $obj[0] = 1 ;
45 -]
46
47 [-
48 $obj[0] = test::object->new (0) ;
49
50
51
52 $obj[1] = test::object->new (1) ;
53 $obj[2] = test::object->new (2) ;
54 $obj[3] = test::object->new (3) ;
55 -]
56
57 <TABLE BORDER=0 WIDTH=90%>
58 <TR>
59 [- $o = $obj[$row] -]
60 <TD>
61 <A HREF="index.html?id=[+ $o->id+]">[+$o->name+]</A>
62 </TD>
63 </TR>
64 </TABLE>
65
66
67 </body>
68 </html>