There is some highly suspect code in Users.pm (several occurences)
my $othercUID = $cUIDList-> if (($cUIDList) && scalar(@$cUIDList));
It appears that despite "use strict", perl creates an entry in the global symbol table for $othercUID if the test fails. It only makes the var "my" if the test passes.
my $othercUID; $othercUID = $cUIDList-> if (($cUIDList) && scalar(@$cUIDList));
Note that the 4.2.0 tests pass, despite this, for reasons i don't fully understand. Logically it may have an effect when TWiki is used in a mod_perl environment, so setting to urgent.
I only noticed this because the tests started failing in my development env, where I am working on other (extensive) changes that may be highlighting it.
FYI I'm using perl 5.8.8.
- 03 Jan 2008
Oh, that particular Perl trap is around for quite a couple of years. I found a reference dating back to 2000 in http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-05/msg00644.html
Due to the current implementation, Perl indeed is creating sort of a static variable (not an entry in the global symbol table, though) if the test fails.
switch still fails to create a warning in this case
- 04 Jan 2008
When I traced this code in the debugger a few months ago (having noticed the my .. if bizzo) it appeared to make not functional change to the code. I left it figuring that we would clean it post freeze. I the process of fixing Item5185
I've removed it entirely. It could
have an effect in mod_perl though, I didn't think of that.
- 07 Jan 2008