Hi,

this looks like a bug in 2.0b7. The problem is not that $testvar is
corrupted, but that the code for the output is not executed (because of the
exit), but the html is outputed (what should not happen)

I have to rework the exit handling anyway. I like to have a exit that exits
the whole processing, so we don't need theses cascaded exits anymore.

I let you know as soon as I found the bug

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


----- Original Message -----
From: "Bayer, Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 6:37 PM
Subject: proper way to "exit" from an Embperl page ? bug ?


>
> In version 1.3.4 of Embperl, along with mod_perl, we used "exit" to create
> embperl pages that could conditionally halt their execution.  Often we
would
> use a series of nested pages that each contained a conditional "exit"
> statement, so that an inner executed page could halt its execution, and
> right before the exit would set a global variable, indicating to the
parent
> page that it should exit also.
>
> In Embperl 2.0b7 this functionality breaks, since if a parent and child
page
> both include an "exit" statement, the outer "exit" statement fails for
some
> reason, and variables that may have been shared between the two pages seem
> to be corrupted as well.  I get the same results if I try "Apache::exit" .
>
> example hello.phtml  (phtml is the extension we use to map in mod_perl):
>
> hello world !<BR>
> [-Execute({inputfile=>'bye.phtml',package=>__PACKAGE__});-]
> executed bye, testvar is '[+ $testvar +]'<BR>
> [- exit;-]
> hello below the exit<BR>
> testvar is  '[+ $testvar +]'<BR>
>
> example bye.phtml:
>
> bye world !<BR>
> [- $testvar = "this is testvar";
> exit;
> -]
> bye below the exit<BR>
>
> if either or both of the "exits" are commented out, the script acts as
> expected.  with both of them in place, the script produces:
>
> hello world !
> bye world !
> executed bye, testvar is 'this is testvar'
> hello below the exit
> testvar is '<[+>$testvar '
>
> Where you can see that the second "exit" did not take place, and also the
> value of $testvar was corrupted.  This methodolgy worked fine in the 1.3.4
> version of Embperl (which is on a production website).
>
>
>
>
>
>
============================================================================
==
> "WorldSecure Server <mlbaseball.com>" made the following
>  annotations on 05/01/02 12:38:13
> --------------------------------------------------------------------------
----------------------------------------------------------------------------
------
> [INFO] -- Virus Manager:
> No Viruses were detected in this message.
>
>
============================================================================
==
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to