Debian Codegraph @

test/html/plain.htm

raw ◀ ▶
1 Debian patch touch this file
1
2 <html>
3 <head>
4 <title>Some Plain tests for Embperl</title>
5 </head>
6
7 <!-- Here is a comment -->
8
9 <body>
10
11 Here it starts with some HTML Text<P>
12
13 All values should be undefined:
14
15 $a = [+ $a || '' +] <BR>
16 $b = [+ $b || '' +] <BR>
17 $c = [+ $c || '' +] <BR>
18 $d = [+ $d || '' +] <BR>
19 $e = [+ $e || '' +] <BR>
20
21 ARRAY @d = [+ do { my @tmp1 = @d; "@tmp1" } +] num = [+ @d +] <BR>
22 ARRAY @x = [+ do { my @tmp1 = %x; "@tmp1" } +] num = [+ @x +] <BR>
•23 HASH %a = [+ do { my @tmp1 = %a; my @tmp11 = sort @tmp1 ; "@tmp11" } +] num = [+ 0+keys %a +] <BR>
24 HASH %y = [+ do { my @tmp2 = %y; my @tmp21 = sort @tmp2 ; "@tmp21" } +] num = [+ 0+keys %y +] <BR>
25
26
27 First of all assign a value:
28 [- $a = '(this is the value in $a)' -] <BR>
29 [- @d = (1, 2, 3) ; @x = (9, 8, 7) -]
30 [- %a = (1 => 'a', 2 => 'b', 3 => 'c') ; %y = (9 => 'x', 8 => 'y', 7 => 'z') -]
31
32
33 Now we have some 'Umlaute':
34
35
36 [- $b = "$a &auml;&ouml;&uuml;" -]
37
38 Now lets look what we are getting from this:<BR>
39 [+ $a +] [+ $b +]<BR>
40
41 ARRAY @d = [+ "@d" +] num = [+ @d +] <BR>
42 ARRAY @x = [+ "@x" +] num = [+ @x +] <BR>
•43 HASH %a = [+ do { my @tmp1 = %a; my @tmp11 = sort @tmp1 ; "@tmp11" } +] num = [+ 0+keys %a +] <BR>
44 HASH %y = [+ do { my @tmp2 = %y; my @tmp21 = sort @tmp2 ; "@tmp21" } +] num = [+ 0+keys %y +] <BR>
45
46 And now a and b together: [+ "$a$b" +]<P>
47
48 Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
49
50 [+ $c = <BR> 6 + 17 <font size="3"> * 3 </font> &nbsp;&nbsp; + 0 +]
51 [+ "SELECT * <br> FROM a ORDER BY b USING <; Hi There>" +]
52
53 Here we have something which looks like a HTML tag, but does not start with<br>
54 a character, Embperl does not change them!<BR>
55
56 [+ "SELECT * FROM a ORDER BY b USING <; Hi There>" +]
57
58 Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 will get the perl expression $a &lt; 6: <BR>
59
60 [- $e = 2 # here is a perl comment -]
61 [+ $d = $e &lt; 6 +]
62
63 Now they should have a value
64
65 $a = [+ $a +] <BR>
66 $b = [+ $b +] <BR>
67 $c = [+ $c +] <BR>
68 $d = [+ $d +] <BR>
69 $e = [+ $e +] <BR>
70
71 Input Separator = [+ ord($/) +]<br>
72
73 [-=pod
74
75 blabla
76
77 =cut-]
78
79 [-
80 =pod
81
82 blabla
83
84 =cut
85 -]
86
87
88
89
90 <P>Ok.<P>
91
92
93 </body>
94 </html>