File: Execute.htm

package info (click to toggle)
libembperl-perl 2.5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 6,200 kB
  • sloc: ansic: 21,387; perl: 14,496; cpp: 467; xml: 49; makefile: 32; sh: 24
file content (137 lines) | stat: -rw-r--r-- 3,688 bytes parent folder | download | duplicates (10)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<HTML><TITLE>Test for Embperl::Execute</TITLE><BODY>
<H1> 1.) Include from memory</H1>
<P>Here is some text</P>
<H1> 2.) Include from memory with some Embperl code</H1>
^<table> ?<tr> ?<td>a1</td> ?<td>b2</td> ?<td>c3</td> ?</tr> ?</table> ?</P>
<H1> 3.) Include from memory with passing of variables</H1>
<P>Transfer some vars Some Var !</P>
<H1> 4.) Change the variable, but not the code</H1>
<P>Transfer some vars Do it again !</P>
<H1> 5.) Use @param to pass parameters</H1>
<P>Use @param to transfer some data (1 2 3 4) !</P>
<H1> 6.) Use @param to pass parameters and return it</H1>
<H3> $p[0] is vara and $p[1] is varb<H3><P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P>
<H3> $p[0] is now newA and $p[1] is now newB<H3><H1> 7.) Presetup %fdat and @ffld</H1>
<P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
<H1> 8.) Inculde a file</H1>

Here it starts with some HTML Text<P>

All values should be undefined at the first include and
apear at the second include:
<P>

$a =  <BR>
$b =  <BR>
$c =  <BR>
$d =  <BR>
$e =  <BR>


First of all assign a value:
<BR>

Now we have some 'Umlaute':


Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>

And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>

Here we have some HTML tags within the perl code, Embperl will delete them!<BR>

57
SELECT *  FROM a ORDER BY b USING &lt;; Hi There&gt;
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>

SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
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>

1
Now they should have a value

$a = (this is the value in $a) <BR>
$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>

<P>Ok.<P>


<H1> 9.) Inculde a file and return output in a scalar</H1>
<H3>
Here it starts with some HTML Text<P>

All values should be undefined at the first include and
apear at the second include:
<P>

$a = <BR>
$b = <BR>
$c = <BR>
$d = <BR>
$e = <BR>


First of all assign a value:
<BR>

Now we have some 'Umlaute':


Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>

And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>

Here we have some HTML tags within the perl code, Embperl will delete them!<BR>

57
SELECT *  FROM a ORDER BY b USING &lt;; Hi There&gt;
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>

SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
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>

1
Now they should have a value

$a = (this is the value in $a) <BR>
$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>

<P>Ok.<P>


</H3>
<H1> 10.) Test $req_rec inside Execute</H1>

<html>
<head>
<title>Test for $req_rec in Embperl</title>
</head>

$conf = &lt;undef&gt; <br> 
^\$_\[0\] = Embperl::Req=HASH\(0x 
$_[1] = &lt;undef&gt; <br> 

^\$rec_rec  = Apache2?(::RequestRec)?=SCALAR\(0x
^\$\$rec_rec = -?\d+<br>

^Apache->request    = Apache2?(::RequestRec)?=SCALAR\(0x
^\$\{Apache->request\} = -?\d+<br>

^\${Apache->request} = \$\$req_rec \?  yes  

^test/html/registry/Execute.htm
</body>
</html>

<H1> 11.) Done :-)</H1>
</body></html>