Embperl Tests - Include other Embperl pages via Execute
1.) Include from memory
Here is some text
2.) Include from memory with some Embperl code
3.) Include from memory with passing of variables
Transfer some vars Some Var !
4.) Change the variable, but not the code
Transfer some vars Do it again !
5.) Use \@param to pass parameters
Use @param to transfer some data (1 2 3 4) !
6.) Use \@param to pass parameters and return it
$p[0] is vara and $p[1] is varb
Got data in @param (vara varb) !
Change data in @param to (newA newB) !
$p[0] is now newA and $p[1] is now newB
7.) Presetup \%fdat and \@ffld
8.) Inculde a file
Here it starts with some HTML Text
All values should be undefined at the first include and
apear at the second include:
$a =
$b =
$c =
$d =
$e =
First of all assign a value:
Now we have some 'Umlaute':
Now lets look what we are getting from this:
(this is the value in $a) (this is the value in $a) äöü
And now a and b together: (this is the value in $a)(this is the value in $a) äöü
Here we have some HTML tags within the perl code, Embperl will delete them!
57
SELECT * FROM a ORDER BY b USING <; Hi There>
Here we have something which looks like a HTML tag, but does not start with
a character, Embperl does not change them!
SELECT * FROM a ORDER BY b USING <; Hi There>
Embperl will also translate HMTL escapes to the right characters i.e. $a < 6 will get the perl expression $a < 6:
1
Now they should have a value
$a = (this is the value in $a)
$b = (this is the value in $a) äöü
$c = 57
$d = 1
$e = 2
Ok.
9.) Inculde a file and return output in a scalar
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 = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <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) äöü<BR>
And now a and b together: (this is the value in $a)(this is the value in $a) äöü<P>
Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
57
SELECT * FROM a ORDER BY b USING <; Hi There>
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 <; Hi There>
Embperl will also translate HMTL escapes to the right characters i.e. $a &lt; 6 will get the perl expression $a < 6: <BR>
1
Now they should have a value
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
<P>Ok.<P>
10.) Include inside a table
m1 : Start include
Parameters:
p0 m1
p1 main
End include
|
m2 : Start include
Parameters:
p0 m2
p1 main
End include
|
m3 : Start include
Parameters:
p0 m3
p1 main
End include
|
11.) Inculde a file with parameters
Here is param[0] -> 0
Here is param[1] -> B
Here is param[2] -> three
Here is param[3] -> dddd
Here is param[4] -> 555
12.) Done :-)
HTML::Embperl (c) 1997-1998 G.Richter