During testing of Perl 5.6.1 and unit test cases I came over this strange error.
[Sun Feb 18 21:14:13 2007] TestRunner.pl: "my" variable $twiki masks earlier declaration in same scope at /var/www/Patch04x01/test/unit/HierarchicalWebsTests.pm line 274.
[Sun Feb 18 21:14:13 2007] TestRunner.pl: "my" variable $twiki masks earlier declaration in same scope at /var/www/Patch04x01/test/unit/HierarchicalWebsTests.pm line 294.
[Sun Feb 18 21:14:13 2007] TestRunner.pl: "my" variable $twiki masks earlier declaration in same scope at /var/www/Patch04x01/test/unit/HierarchicalWebsTests.pm line 314.
It turns out the problem are these double definitions of $twiki
$twiki = new TWiki( $TWiki::cfg{DefaultUserName}, $query);
my $twiki = new TWiki();
Looking at the rest of the similar test cases it seems someone just plain forgot to remove the 2nd definition several places.
Removing them makes the test cases pass both under Perl 5.8 and 5.6.
--
TWiki:Main.KennethLavrsen - 18 Feb 2007
Closing. No need for this as entry in release notes.
--
TWiki:Main.KennethLavrsen - 18 Feb 2007