AW: DESTROY executed twice

2006-06-16 Thread Glaessl, Danilo
STROY executed twice On 6/13/06, Glaessl, Danilo <[EMAIL PROTECTED]> wrote: > sub DESTROY { > exit($exit_code); > } I don't think that exit() will do what you might expect, when called from DESTROY. At that point, the DESTROY hasn't finished, so your objec

Re: DESTROY executed twice

2006-06-14 Thread Tom Phoenix
On 6/13/06, Glaessl, Danilo <[EMAIL PROTECTED]> wrote: sub DESTROY { exit($exit_code); } I don't think that exit() will do what you might expect, when called from DESTROY. At that point, the DESTROY hasn't finished, so your object is still alive, and thus it will need to be

Re: AW: DESTROY executed twice

2006-06-14 Thread Randal L. Schwartz
By the way, your "AW" is incorrect. The internet standard is "Re:", in spite of Microsoft's intentions to mangle the net by "localizing" a convention that needs no localization. (It's a latin word, not an English abbreviation.) > "Glaessl" == "Glaessl, Danilo" <[EMAIL PROTECTED]> writes: G

AW: DESTROY executed twice

2006-06-14 Thread Glaessl, Danilo
it up, I am in doubt about the objects being really destroyed by both the child and the parent... -Ursprüngliche Nachricht- Von: Randal L. Schwartz [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 13. Juni 2006 16:53 An: beginners@perl.org Betreff: Re: DESTROY executed twice

Re: DESTROY executed twice

2006-06-13 Thread Randal L. Schwartz
> ""Glaessl," == "Glaessl, Danilo" <[EMAIL PROTECTED]> writes: "Glaessl,> I have a OOP problem. I wrote a script that forks several child "Glaessl,> processes that in turn create instances of the same class: The DESTROY is being executed in both the parent and child. There's really no way ar

DESTROY executed twice

2006-06-13 Thread Glaessl, Danilo
Hi, I have a OOP problem. I wrote a script that forks several child processes that in turn create instances of the same class: for (my $i = 0; $i <= 10; $i++) { defined(my $pid = fork()) or die "Unable to fork: $!"; if ($pid) { # parent process next; }