perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Melchers <melch...@nureg.de>
Subject Re: @param seems to be shared between Execute calls
Date Wed, 21 Jul 2010 09:17:17 GMT
Hi,

Am 21.07.2010 um 11:05 schrieb Michael Smith:

> My problem is slightly different - though possibly a manifestation of the same thing.
 I find that param isn't cleaned up between requests.
> 
> I have two epl files:
> 
> set.epl:
> [- $param[0]->{'test'} = 1 -]
> 
> get.epl
> [+ Dumper(@param) +]
> 
> I find that the data from set.epl turns up when I make a subsequent request for get.epl
(in practice it's a bit more random than that if one is running multiple processes, so I make
a few requests for set.epl and then a few for get.epl)
> 
> This only seems to be relevant if I reference param in the epl file I am calling directly.
 If I reference it in epl files which are loaded in by Execute, then they do appear to get
cleaned up.

I think, in "set.epl" you create a global variable "@param" and fill some values in it. Global
variables are not cleaned up after the request, so "get.epl" will see this global var later,
if you hit an apache process which ran "set.epl" before. This is also a good way to eat all
memory of the apache processes.... :-(

I think, this would also work if you name it "$foo[0]...." - so there is no magic in "@param",
if it is not used in an "Execute"-Call. 

You may also take care of nested calls of epl-files: the @param is the same for all calls,
so you might get some strange effects there...


With best regards

Dirk Melchers
/// IT/Software-Entwicklung ///

-- 
NUREG GmbH ///
Dorfäckerstraße 31 | 90427 Nürnberg | Germany
Tel. +49-911-32002-256 | Fax +49-911-32002-299
Mobil +49-172-9354670 | www.nureg.de
Nürnberg HRB 22653 | USt.ID DE 814 685 653
Geschäftsführer: Michael Schmidt, Stefan Boas


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message