Will each instance of $mailer in the children actually be the same object affecting the same data or will they be their own seperate entity containing only the data populated in $mailer up to the point of forking? In other words, if in one child I change/add something via a $mailer method, will it affect the other processes? It dosen't seem like it could, but I'm not sure. -Chaduse My_Mailer; my $mailer = My_Mailer->new(); for (my $x=0;$x < 10;$x++) { unless (fork) { $mailer->initialisation_stuff(); $mailer->send(); exit; } }
In reply to Objects and forking by gnu@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |