test/html/var.htm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 50 | 50 | 100.0 |
branch | n/a | ||
condition | 5 | 10 | 50.0 |
subroutine | 7 | 7 | 100.0 |
pod | n/a | ||
total | 62 | 67 | 92.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 12 | ||||
1 | 66 | ||||||
1 | 245 | ||||||
2 | |||||||
3 | |||||||
4 | 1 | 1 | 3 | |
|||
1 | 4 | ||||||
5 | |||||||
6 | 1 | 22 | |||||
7 | |||||||
8 | |||||||
9 | 1 | 1 | 8 | [$VAR $a $b $c $d $e $] | |||
1 | 1 | 2 | |||||
1 | 1 | 43 | |||||
1 | 12 | ||||||
1 | 2 | ||||||
1 | 221 | ||||||
1 | 6 | ||||||
1 | 1 | ||||||
1 | 670 | ||||||
10 | |||||||
11 | Here it starts with some HTML Text
|
||||||
12 | 1 | 1 | 7 | ||||
1 | 1 | 4 | |||||
1 | 93 | ||||||
1 | 6 | ||||||
1 | 2 | ||||||
1 | 41 | ||||||
13 | |||||||
14 | All values should be undefined: | ||||||
15 | |||||||
16 | 1 | 50 | 13 | $a = [+ $a || '' +] |
|||
17 | 1 | 50 | 8 | $b = [+ $b || '' +] |
|||
18 | 1 | 50 | 8 | $c = [+ $c || '' +] |
|||
19 | 1 | 50 | 7 | $d = [+ $d || '' +] |
|||
20 | 1 | 50 | 7 | $e = [+ $e || '' +] |
|||
21 | |||||||
22 | |||||||
23 | First of all assign a value: | ||||||
24 | 1 | 2 | [- $a = '(this is the value in $a)' -] |
||||
25 | 1 | 2 | |||||
1 | 3 | ||||||
26 | Now we have some 'Umlaute': | ||||||
27 | 1 | 19 | |||||
28 | |||||||
29 | 1 | 3 | [- $b = "$a äöü" -] | ||||
30 | 1 | 2 | |||||
1 | 5 | ||||||
31 | Now lets look what we are getting from this: |
||||||
32 | 1 | 19 | [+ $a +] [+ $b +] |
||||
1 | 7 | ||||||
33 | 1 | 5 | |||||
34 | 1 | 8 | And now a and b together: [+ "$a$b" +]
|
||||
35 | |||||||
36 | Here we have some HTML tags within the perl code, Embperl will delete them! |
||||||
37 | |||||||
38 | 1 | 7 | [+ $c = 6 + 17 * 3 +] |
||||
39 | |||||||
40 | Embperl will also translate HMTL escapes to the right characters i.e. $a < 6 will get the perl expression $a < 6: |
||||||
41 | |||||||
42 | 1 | 3 | [- $e = 2 -] | ||||
43 | 1 | 2 | [+ $d = $e < 6 +] | ||||
1 | 2 | ||||||
1 | 16 | ||||||
44 | |||||||
45 | 1 | 20 | Now they should have a value | ||||
46 | |||||||
47 | 1 | 6 | $a = [+ $a +] |
||||
48 | 1 | 4 | $b = [+ $b +] |
||||
49 | 1 | 3 | $c = [+ $c +] |
||||
50 | 1 | 4 | $d = [+ $d +] |
||||
51 | 1 | 7 | $e = [+ $e +] |
||||
52 | |||||||
53 | 1 | 1 | Ok.
|
||||
54 | |||||||
55 | 1 | 1423 | [# | ||||
56 | This is an Embperl comment | ||||||
57 | it will totaly removed from the html source | ||||||
58 | #] | ||||||
59 | |||||||
60 | [# [+ "blabla" +] it will also hide perl code #] | ||||||
61 | |||||||
62 | |||||||
63 |