Ol� Gerald,

Resposta a sua mensagem de ter�a-feira, 9 de abril de 2002:

GR> Hi,

>>
>>   The @param array should not be cleaned automatically after the
>>   end of the request?
>>

GR> Normaly it should...

GR> Can you provide a small example that shows exactly what you are doing when
GR> things goes wrong?

I have a persistent object module that saves the data to disk in the
DESTROY method of the class.

I'm using EmbperlObject. In a normal page page I call:
Execute('caixa_processar_carrinho.epl', $loja, $carrinho);

This page do some calculations and use the 2 objects passed in @param.
The $carrinho object is the persistent one.

In caixa_processar_carrinho.epl:
[-
($loja, $carrinho) = @param;

# Do some calculations

# Add some parameters to $carrinho
-]

The DESTROY method of the $carrinho object was no being called and
when I changed the code to:
[-
$loja = shift @param;
$carrinho = shift @param;
-]

everything started to work fine.

I made some tests dumping the values of the $carrinho object to a debug
file and in both cases the execution of the
caixa_processar_carrinho.epl file was right. The only difference was
that in the first case in the next request the $carrinho object was
without the new data added in this page. I also inserted a debug
message in the DFESTROY method and it was not being called at all in
the first case. Only when retrieved the object from @param with
'shift' it started to work.

Sorry if this seems confuse...

Thanks and best wishes,

Luiz Fernando B. Ribeiro
Engenho Solu��es para a Internet
[EMAIL PROTECTED]


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

Reply via email to