• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3656: Mysterious double definition of new TWiki in HierarchicalWebsTests fails in perl 5.6.1

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 4.1.2

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Mysterious double definition of new TWiki in HierarchicalWebsTests fails in perl 5.6.1
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4
SVN Range TWiki-4.1.1, Fri, 16 Feb 2007, build 12896
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins 12915 12916
TargetRelease patch
ReleasedIn 4.1.2
Topic revision: r1 - 2007-02-18 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback