problem of persistance

2004-09-17 Thread Arnaud Blancher
hi all with mp2 1.99_14,perl 5.8.5,apache 2.0.50 i have a problem of persistance. I just print IP, time and pid. when 2 computer get the script they sometimes see the have the same IP and the same time ! i would like all my variable aren't share and especially the $user object so could you

Re: problem of persistance

2004-09-17 Thread Arnaud Blancher
the complete config: -8<-- Start Bug Report 8<-- 1. Problem Description: [DESCRIBE THE PROBLEM HERE] 2. Used Components and their Configuration: *** mod_perl version 1.9914 *** using lib/Apache/BuildConfig.pm *** Makefile.PL options: MP_AP_PREFIX=> /usr

Re: problem of persistance

2004-09-17 Thread Perrin Harkins
Arnaud Blancher wrote: i would like all my variable aren't share and especially the $user object You are creating a closure. Easy to fix: use My_module; my $user = My_module->new(ip=>$ENV{'REMOTE_ADDR'},pid=>$$); &taff2(); Make that: taff2($user); sub taff2 { add this to the beginning of taff2: my

Re: problem of persistance

2004-09-17 Thread Arnaud Blancher
thank you it's seems to be ok. i ll read again closure in camel book ! Arnaud You are creating a closure. Easy to fix: use My_module; my $user = My_module->new(ip=>$ENV{'REMOTE_ADDR'},pid=>$$); &taff2(); Make that: taff2($user); sub taff2 { add this to the beginning of taff2: my $user = shift; -

Re: problem of persistance

2004-09-17 Thread Stas Bekman
Arnaud Blancher wrote: thank you it's seems to be ok. i ll read again closure in camel book ! See also: http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Understanding_Closuresthe_Easy_Way -- __ Stas Bekman

Re: problem of persistance

2004-09-20 Thread Arnaud Blancher
Stas Bekman wrote: Arnaud Blancher wrote: thank you it's seems to be ok. i ll read again closure in camel book ! See also: http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Understanding_Closuresthe_Easy_Way ok first, i suppose i can't forbiden closure in my script ! b

Re: problem of persistance

2004-09-20 Thread Tom Schindl
Arnaud Blancher wrote: [...] third i put a 'use warning' in the script. In the apache error log i see the warning. that's ok but i must restart the serveur when i change a module, that's more boring . is it better way to test ? Are you looking for http://perl.apache.org/docs/2.0/api/Apache/Reload.

Re: problem of persistance

2004-09-20 Thread Perrin Harkins
On Mon, 2004-09-20 at 06:41, Arnaud Blancher wrote: > i see the potential problem of mod perl but it's not a really good solution > to change the script every times i want to test ! Perl is not going to warn you about this because it is actually legal to do it this way in perl. There's no way for