Embperl Tests - Include other Embperl pages via Execute

1.) Include from memory

Here is some text

2.) Include from memory with some Embperl code

a1 b2 c3

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

fdattext
testvalue

8a.) Include 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 * <br> 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 &lt; 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) &auml;&ouml;&uuml;
$c = 57
$d = 1
$e = 2

Ok.

8b.) Include again the same file

Here it starts with some HTML Text

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

$a = (this is the value in $a)
$b = (this is the value in $a) &auml;&ouml;&uuml;
$c = 57
$d = 1
$e = 2
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) &auml;&ouml;&uuml;
And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;

Here we have some HTML tags within the perl code, Embperl will delete them!
57 SELECT * <br> 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 &lt; 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) &auml;&ouml;&uuml;
$c = 57
$d = 1
$e = 2

Ok.

9.) Include 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) &amp;auml;&amp;ouml;&amp;uuml; <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) &amp;auml;&amp;ouml;&amp;uuml;<BR> And now a and b together: (this is the value in $a)(this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml;<P> Here we have some HTML tags within the perl code, Embperl will delete them!<BR> 57 SELECT * &lt;br&gt; 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) &amp;auml;&amp;ouml;&amp;uuml; <BR> $c = 57 <BR> $d = 1 <BR> $e = 2 <BR> <P>Ok.<P>

10.) Include inside a table

m1 : Start include
m1 - s1 m1 - s2 m1 - s3
Parameters:
m1 main
p0 m1 p1 main End include
m2 : Start include
m2 - s1 m2 - s2 m2 - s3
Parameters:
m2 main
p0 m2 p1 main End include
m3 : Start include
m3 - s1 m3 - s2 m3 - s3
Parameters:
m3 main
p0 m3 p1 main End include

11.) Include 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.) Include a file and write outputfile

12.) Done :-)



HTML::Embperl (c) 1997-1998 G.Richter