Hey everyone.
I was chasing down a bug in my mod_perl site and thought initially a variable was being undesirably cached because of my use of the my $var style code with use strict;
Instead of saying
my %Cookies = $standardLibrary->&GetCookies('CookieName');
I used,
my %Cookies;
undef(%Cookies);
%Cookies = $standardLibrary->&GetCookies('CookieName');
I thought this would solve my problem with the cookies of another person's browser being used when someone else visits the site.
It turns out that after doing this it didn't help, and was more likely because the %Cookies var wasn't being undefined inside my library within the GetCookies sub. It appears to have corrected the problem. I just tested it again and would have been doing it by now.
My question is, why use strict? and was it contributing to the problem? My guess is that it wasn't causing the problem at all but now I wonder why use it at all.
Thanks,
Tony
I was chasing down a bug in my mod_perl site and thought initially a variable was being undesirably cached because of my use of the my $var style code with use strict;
Instead of saying
my %Cookies = $standardLibrary->&GetCookies('CookieName');
I used,
my %Cookies;
undef(%Cookies);
%Cookies = $standardLibrary->&GetCookies('CookieName');
I thought this would solve my problem with the cookies of another person's browser being used when someone else visits the site.
It turns out that after doing this it didn't help, and was more likely because the %Cookies var wasn't being undefined inside my library within the GetCookies sub. It appears to have corrected the problem. I just tested it again and would have been doing it by now.
My question is, why use strict? and was it contributing to the problem? My guess is that it wasn't causing the problem at all but now I wonder why use it at all.
Thanks,
Tony