You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Frank Sweetser <fs...@WPI.EDU> on 2002/03/25 00:37:41 UTC
execution vs output timing
Given
[- some code here -]
some html here
is it guaranteed that the code block will be executed completely *before*
the html block is sent to the browser?
--
Frank Sweetser fs at wpi.edu, fs at suave.net | $ x 18
Full-time WPI Network Tech, Part time Linux/Perl guy |
Of course, I reserve the right to make wholly stupid changes to Perl
if I think they improve the language. :-)
-- Larry Wall in <19...@wall.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: execution vs output timing
Posted by Gerald Richter <ri...@ecos.de>.
> Given
>
> [- some code here -]
> some html here
>
> is it guaranteed that the code block will be executed completely *before*
> the html block is sent to the browser?
>
Yes. In the default setting, _all_ code is executed before the first byte in
the send to the server, so Embperl can catch errors and honour changes of
http headers.
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: execution vs output timing
Posted by David Lloyd <ll...@rebel.net.au>.
Hmmm...
> [- some code here -]
> some html here
>
> is it guaranteed that the code block will be executed completely *before*
> the html block is sent to the browser?
I think it is. For example, if you modify a global variable in the [- -]
block then use a [+ +] block afterwards you ALWAYS see the changes made
in the [- -] block...
DSL
--
Praise belongs to God, the Lord of all Being,
the All Merciful, the All Compassionate
the Master of the Day of Doom.
(The Opening to the Qu'ran)
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: execution vs output timing
Posted by Kee Hinckley <na...@somewhere.com>.
At 6:37 PM -0500 3/24/02, Frank Sweetser wrote:
>Given
>
>[- some code here -]
>some html here
>
>is it guaranteed that the code block will be executed completely *before*
>the html block is sent to the browser?
I can't see how it would be otherwise. After all, I've occasionally done:
[- Apache::exit() -]
some html
And depended on that exit getting out of there immediately.
There is a separate issue, which is whether the browser sees code as
it's executed, or when it's all done. But that's governed by a
setting.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org